Re: [sqlite] Making data and tables persistent
Darren Duncan wrote: > >> I am using sqlite3 primarily from c++, everything is working fine, > >> except when I switch off my computer I loose all data, is there any > >> setting I need to do to make the data and table object persistent in the .db file? > > > > Are you correctly closing your connection to the database before your application quits ? > > > > Does a file with the correct name exist on your disk ? Does it have zero length ? > > For that matter, maybe hinted from the second point here, are you using a regular file-based database or a MEMORY one? -- Darren Duncan ___ And are you using autocommit, or are you manually beginning and ending transactions? If you have a number of uncommitted transactions prior to closing the database (or a power failure / app crash / OS crash occurs before you commit them), the next time you opened the database, sqlite would rollback the uncommitted changes in the journal file (I assume). Nick. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Making data and tables persistent
Simon Slavin wrote: > On 3 Jun 2011, at 3:50am, Sarkar, Arup wrote: > >> I am using sqlite3 primarily from c++, everything is working fine, except >> when I switch off my computer I loose all data, is there any setting I need >> to do to make the data and table object persistent in the .db file? > > Are you correctly closing your connection to the database before your > application quits ? > > Does a file with the correct name exist on your disk ? Does it have zero > length ? For that matter, maybe hinted from the second point here, are you using a regular file-based database or a MEMORY one? -- Darren Duncan ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Making data and tables persistent
On 3 Jun 2011, at 3:50am, Sarkar, Arup wrote: > I am using sqlite3 primarily from c++, everything is working fine, except > when I switch off my computer I loose all data, is there any setting I need > to do to make the data and table object persistent in the .db file? Are you correctly closing your connection to the database before your application quits ? Does a file with the correct name exist on your disk ? Does it have zero length ? Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Making data and tables persistent
Hi: I am using sqlite3 primarily from c++, everything is working fine, except when I switch off my computer I loose all data, is there any setting I need to do to make the data and table object persistent in the .db file? Environment: Windows 7 Professional 64 bit. Dev Env: Visual Studio 2010. Regards, Arup ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users