On 10/5/06, Levi Wilson <[EMAIL PROTECTED]> wrote:
I have a process that opens up a connection to my database when it starts up
with sqlite3_open.  This connection is kept for the life of the process.  In
one of my functions, it inserts a row into one table, and also into another
table that is related.  Therefore, I wrap both statements within a "BEGIN
TRANSACTION" and finally a "COMMIT" if all is well.  However, if the second

do you have two BEGINs or just one? It should be only one.

statement fails, I roll it back.  This seems to work fine, althouth the
statements have not failed.  The problem that I'm having is if I open up the
database from "SQLite Database Browser.exe" (or even the command line
program, if I delete all of the items out of the first table, when I call my
function again to populate the two tables, the "BEGIN TRANSACTION" succeeds,
but after the call the "COMMIT" happens, I get an error from the resultset
that the database is missing or corrupt.  Does it have to do with my process
keeping the connection alive and the autocommit being on?  Any help would be
greatly appreciated, and please let me know if I have not been clear.
Thanks in advance!

Is your database version the same on both the generated code and the
browser tool? Sounds like it might be a version mis match. If you're using
a DLL or loaded library be sure you don't have two on your system and you;re
loading the wrong one.

Good luck


--
SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to