Results 1 to 2 of 2

Thread: problem with QSQLITE.

  1. #1
    Join Date
    Jan 2011
    Posts
    33
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default problem with QSQLITE.

    I saw QT's project example cachedtable.

    In that write is :

    Qt Code:
    1. QSqlDatabase::database("in_mem_db", false).close();
    2. QSqlDatabase::removeDatabase("in_mem_db");
    3. QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", "in_mem_db");
    4. db.setDatabaseName(":memory:");
    To copy to clipboard, switch view to plain text mode 

    Where did Database created ?

    when I want to backup this data, what do I do ?

    thank and best regards !
    Last edited by Con Nít; 2nd August 2011 at 08:04.

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with QSQLITE.

    In SQLite, if you open a database with name ':memory:', you're creating a "in-memory" database.

    If you want to backup data you can use SQLite specific API or do manually using a database copy.
    A camel can go 14 days without drink,
    I can't!!!

  3. The following user says thank you to mcosta for this useful post:

    Con Nít (2nd August 2011)

Similar Threads

  1. QSQLITE problem with FOREIGN KEY
    By kamilus in forum Qt Programming
    Replies: 6
    Last Post: 26th April 2011, 00:10
  2. Problem deploying qt application using qsqlite on Windows XP/7
    By anoraxis in forum Installation and Deployment
    Replies: 4
    Last Post: 8th April 2011, 13:18
  3. QSqlite in QT4
    By sophister in forum Qt Programming
    Replies: 26
    Last Post: 5th April 2009, 12:52
  4. Replies: 1
    Last Post: 7th July 2008, 20:13
  5. QSqlite problem
    By dragon in forum Qt Programming
    Replies: 2
    Last Post: 11th April 2007, 02:02

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.