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]sqlite+qt
Forum Update on Monday, May 27th 2025

[Solved]sqlite+qt

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.5k 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
    MaZi
    wrote on last edited by
    #1

    Hi. I'm have problem with Sqlite.

    @QSqlQuery query(db);
    query.exec"INSERT INTO tablename (colum1,colum2) VALUES (1,1),(1,1);"@

    in SQLiteManager this sql-code complete.

    This is action not add data to table, but used code:
    @QSqlQuery query(db);
    query.exec"INSERT INTO tablename (colum1,colum2) VALUES (1,1);"@

    full good.
    error not have in lastError()
    I not have idea for with problem.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      Hi,

      I am not sure, but I once also had errors with such statements which worked in MySQL workbench but not via API. Try adding a space between the value brakets and the comma (1,1) , (1,1);

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MaZi
        wrote on last edited by
        #3

        [quote author="Gerolf" date="1350455734"]Hi,

        I am not sure, but I once also had errors with such statements which worked in MySQL workbench but not via API. Try adding a space between the value brakets and the comma (1,1) , (1,1);[/quote]

        thank you, but it's not work =(
        what's can speed adding records in SQLite?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MaZi
          wrote on last edited by
          #4

          I'm compete my question. I use command synchronous=0 and speed up.
          read man in this www.sqlite.org/pragma.html

          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