Results 1 to 2 of 2

Thread: regarding database

  1. #1
    Join Date
    Sep 2010
    Location
    Bangalore
    Posts
    169
    Thanks
    59
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default regarding database

    hi everyone! I have created a simple database and in it a table with the fields id,name,address. then i have entered a name and address for a id. Now what i want to do is, i want to extract the stored name from the database and store it in a variable (of type QString). Well, how to do? I'm not getting any idea.

  2. #2
    Join Date
    May 2009
    Location
    USA
    Posts
    300
    Thanks
    82
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: regarding database

    You just need to create a connection to the database, like you did before creating it, then use QSqlQuery to get your data.

    Look at examples here: http://doc.trolltech.com/4.5/qsqlquery.html#details

Similar Threads

  1. Replies: 9
    Last Post: 20th May 2010, 09:55
  2. can Qt4 use ADO database?
    By The_hero in forum Qt Programming
    Replies: 0
    Last Post: 3rd June 2009, 03:17
  3. Database
    By Tara in forum Qt Programming
    Replies: 1
    Last Post: 13th April 2009, 08:20
  4. Database
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 14th April 2008, 13:37
  5. Database example
    By marvaneke in forum General Discussion
    Replies: 3
    Last Post: 27th June 2006, 09:02

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
  •  
Qt is a trademark of The Qt Company.