Results 1 to 2 of 2

Thread: QSqlTableModel Help pls

  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QSqlTableModel Help pls

    Hi,

    The setRecord(int row,QSqlRecord &) returns true, whereas the submitAll() returns false.
    Can someone pls tell me what can be the problem?

    lastError() is "No fields to update" whereas i have fields that need to be updated.

    Pls Help

    Thanks a lot.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSqlTableModel Help pls

    Did you first fill the QSqlRecord object with field names from the model (for example by calling QSqlRecord rec = model->record())?

Similar Threads

  1. Trouble with "INSERT" by QSqlTableModel
    By AD in forum Qt Programming
    Replies: 12
    Last Post: 10th November 2008, 08:21
  2. QSqlTableModel slow even with manual submit
    By pherthyl in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2008, 20:40
  3. QSqlTableModel inserts empty rows
    By Nesbitt in forum Qt Programming
    Replies: 2
    Last Post: 6th August 2008, 12:47
  4. Replies: 4
    Last Post: 9th May 2008, 17:02
  5. QSqlTableModel Help pls
    By munna in forum Newbie
    Replies: 1
    Last Post: 26th January 2006, 07:58

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.