Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] How correctly save data table to DB?
QtWS25 Last Chance

[Solved] How correctly save data table to DB?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 4.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mbynet
    wrote on last edited by
    #1

    I use QSQLITE. Open DB, dispaly in table, make change, close programm. How correctly save data table to DB?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbynet
      wrote on last edited by
      #2

      find answer

      @model->database().transaction();
      if (model->submitAll()) {
      model->database().commit();
      model->select();
      } else {
      model->database().rollback();

      }@
      
      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        I read the title and assumed you meant blueray disc... Only when reading the question itself I realized that you probably meant database:-)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved