Results 1 to 5 of 5

Thread: Can we build database in QT4??

  1. #1
    Join Date
    Mar 2009
    Location
    india->gujarat->bhavnagar
    Posts
    36
    Thanks
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Question Can we build database in QT4??

    hii
    i want to know that can we make database in QT or QT just only provide medium to connect to the prepared database???

    Regards

  2. #2
    Join Date
    Mar 2009
    Posts
    98
    Thanks
    3
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can we build database in QT4??

    Quote Originally Posted by mind_freak View Post
    hii
    i want to know that can we make database in QT or QT just only provide medium to connect to the prepared database???

    Regards
    See the examples in the qt source code. You can create a database using the SQL o SQLITE query commands.

  3. #3
    Join Date
    Mar 2009
    Location
    india->gujarat->bhavnagar
    Posts
    36
    Thanks
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: Can we build database in QT4??

    hii

    i am new to this website so plz can you provide me the link to the qt source code...

  4. #4
    Join Date
    Mar 2009
    Posts
    98
    Thanks
    3
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can we build database in QT4??

    Quote Originally Posted by mind_freak View Post
    hii

    i am new to this website so plz can you provide me the link to the qt source code...
    Puoi scaricare tutto da qui http://www.qtsoftware.com/downloads

  5. #5
    Join Date
    Jun 2009
    Location
    Bato, Leyte, Philippines
    Posts
    10
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Can we build database in QT4??

    QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");

    // create the database
    db.setDatabaseName("payroll.db");

    QSqlQuery query;

    // create the table
    query.exec("create table employee (empid int primary key, "
    "name varchar(50), department varchar(20))");

    // insert records
    query.exec("insert into employee values(1001, 'John', 'Accounting Dept')");
    query.exec("insert into employee values(1002, 'Rey', 'Personnel Dept')");

  6. The following user says thank you to genessr for this useful post:

    mind_freak (13th July 2009)

Similar Threads

  1. Threads and database connection
    By probine in forum Qt Programming
    Replies: 9
    Last Post: 7th August 2013, 08:30
  2. cannot share the database connection!!!!
    By cbarmpar in forum Qt Programming
    Replies: 13
    Last Post: 23rd September 2008, 14:42
  3. Multiple database connections
    By cyberboy in forum Qt Programming
    Replies: 3
    Last Post: 30th March 2008, 16:56
  4. Database Master-Detail Entry Form
    By Phan Sin Tian in forum Newbie
    Replies: 4
    Last Post: 3rd February 2008, 14:31
  5. Build error on mac Platform::WaitMouseMoved
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2007, 13:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.