Qt version: 4.3.0
DB: SqLite
When the application starts, I like to create databases/tables and populate tables with some data. These statements can conveniently be put in a script file. What is the recommended way of doing this in Qt?
Qt version: 4.3.0
DB: SqLite
When the application starts, I like to create databases/tables and populate tables with some data. These statements can conveniently be put in a script file. What is the recommended way of doing this in Qt?
Read a statement into QString, pass it into QSqlQuery and execute it. Read another statement, etc.
I cannot show you the recommended way, but I do it this way:
http://comicmaster.svn.sourceforge.n...10&view=markup
See methods 'createDatabase' and 'createTables'.
This is the data file I use to create my database:
http://comicmaster.svn.sourceforge.n...ql?view=markup
ChrisW67 (8th July 2009), William Wilson (7th September 2007)
Bookmarks