Results 1 to 3 of 3

Thread: Qt4 QPSQL QSqlQuery::lastInsertId oid problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Location
    Minsk, Republic of Belarus
    Posts
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt4 QPSQL QSqlQuery::lastInsertId oid problem

    For pgsql insert query with returning clause:
    INSERT INTO tbl1(col1,col2) VALUES (DEFAULT, 'adsf') RETURNING col1; -- or RETURNING * for all columns
    After that:
    QSqlQuery::next();
    And read returning values (for examle, generated by sequence)
    May be oracle have same mechanism.

  2. #2
    Join Date
    Aug 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Cool Re: Qt4 QPSQL QSqlQuery::lastInsertId oid problem

    Thank you for your help, i will try your advice for oracle, postgres and for mysql. If it works (or not) i will write reply

Similar Threads

  1. Problem using the QPSQL plugin on Windows x64 in Debug mode
    By code_talker in forum Qt Programming
    Replies: 4
    Last Post: 12th August 2010, 13:01
  2. Replies: 4
    Last Post: 10th November 2009, 19:48
  3. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  4. QSqlQuery problem
    By MarkoSan in forum Qt Programming
    Replies: 11
    Last Post: 18th December 2007, 13:25
  5. QPSQL plugin problem
    By tuxi in forum Qt Programming
    Replies: 0
    Last Post: 12th March 2007, 20:44

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.