Results 1 to 6 of 6

Thread: SQLite sometimes doens't INSERT into database

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: SQLite sometimes doens't INSERT into database

    If you put the insert into a transaction and then commit it everything should be written to disc. Do you still get lost data?

  2. #2
    Join Date
    Oct 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: SQLite sometimes doens't INSERT into database

    On some operating systems (windows) I have found that the commit will fail (leaving a journal file) if any of your sql statements are still active. It is necessary to use the clear() function on all active sql statements before the commit.

Similar Threads

  1. Insert unicode in SQlite
    By Kastagne in forum Qt Programming
    Replies: 3
    Last Post: 11th October 2011, 14:07
  2. How can I send a SQLite :memory: database connection ?
    By georgep in forum Qt Programming
    Replies: 4
    Last Post: 20th July 2009, 12:07
  3. Replies: 1
    Last Post: 26th March 2009, 15:25
  4. Bulk insert into SQLite
    By munna in forum Qt Programming
    Replies: 6
    Last Post: 19th November 2007, 03:56
  5. SQLITE database problems
    By phoenix in forum Newbie
    Replies: 3
    Last Post: 30th April 2007, 21:38

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.