Results 1 to 4 of 4

Thread: Qt with Database

  1. #1
    Join Date
    Sep 2006
    Location
    Rio de Janeiro, Brazil
    Posts
    44
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default Qt with Database

    Hello All,

    I am with some doubts and would like the aid them colleagues,

    I have some tables in my database, and necessary in my application to SELECT, to INSERT fields that are in some different tables.

    The question as to make this with QDataTable and QDataBrowser, I looked for the forum and I did not find nothing in relation to this.

    Somebody would have a code example or an idea of as to make.

    That is guilt of the DBA!

    Thanks anticipated.

    Ederson de Moura

  2. #2
    Join Date
    May 2006
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

  3. #3
    Join Date
    Sep 2006
    Location
    Rio de Janeiro, Brazil
    Posts
    44
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Qt with Database

    Yes, already I looked at on class more I did not find the solution.

    I am trying to make something more without success thus.

    /* Code Test */
    if ( dataBrowser ) {
    if ( !dataBrowser->sqlCursor() ) {
    QSqlCursor* cursor = new QSqlCursor( "TABLE1", "TABLE2", "TABLE3" );
    dataBrowser->setSqlCursor( cursor, TRUE );
    dataBrowser->refresh();
    dataBrowser->first();
    }
    }

    Ederson de Moura

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt with Database

    Quote Originally Posted by ederbs View Post
    QSqlCursor* cursor = new QSqlCursor( "TABLE1", "TABLE2", "TABLE3" );
    There is no such constructor defined for QSqlCursor. What exactly are you trying to achieve?

Similar Threads

  1. Qt and MySQL Database Connection
    By shamik in forum Qt Programming
    Replies: 41
    Last Post: 6th October 2006, 12:48
  2. Issues regarding QMySql drivers and mysql database
    By bera82 in forum Qt Programming
    Replies: 2
    Last Post: 10th August 2006, 17:50
  3. Filling combobox from database
    By Philip_Anselmo in forum Qt Programming
    Replies: 3
    Last Post: 11th May 2006, 17:53
  4. Save images to database
    By jnk5y in forum Qt Programming
    Replies: 4
    Last Post: 8th May 2006, 19:56
  5. Replies: 8
    Last Post: 7th March 2006, 13:40

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.