Results 1 to 4 of 4

Thread: [SOLVED]: addDatabase with connectionName problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Nov 2008
    Location
    Częstochowa/Poland
    Posts
    50
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2
    Thanked 11 Times in 11 Posts

    Default Re: addDatabase with connectionName problem

    As You have set a name for Your data base connection You will need to specify a connection for the Query to use.
    QSqlQuery::QSqlQuery ( const QString & query = QString(), QSqlDatabase db = QSqlDatabase() )

    Qt Code:
    1. QSqlQuery qry(QSqlDatabase::database("conn_name"));
    2. qry.prepare("....");
    To copy to clipboard, switch view to plain text mode 
    Last edited by Grimlock; 10th December 2009 at 11:10.
    Me, Grimlock, not "nice dino". ME BASH BRAINS!

  2. The following user says thank you to Grimlock for this useful post:

    omci (10th December 2009)

Similar Threads

  1. Replies: 19
    Last Post: 3rd April 2009, 23:17
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Tags for this Thread

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.