Results 1 to 2 of 2

Thread: How to manage QSqlTableModel database operations?

  1. #1
    Join Date
    May 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default How to manage QSqlTableModel database operations?

    Hellow.

    I have master-detail server model and QSqlTableModel for each database table.
    How can I first to delete only recodrs, then to insert only records and last to update only records? Because, If I will say "submitAll" for each model I can get "Parent key not found" error message. Correctly, I must to delete records, then to insert records and last to update records.

    Thank you.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    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: How to manage QSqlTableModel database operations?

    Could you prepare a minimal compilable example reproducing the problem?

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.