Re: [sqlite] Need help understanding SQLITE_ERROR[1] problem

2007-04-14 Thread drh
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> In the following pseudo-code which works the first time through either
> Function A or Function B I get a problem when either function is
> executed a second time.
> 
> I get the following error:
> 
> SQLITE_ERROR[1] - cannot start a transaction within a transaction
> 

This means that you tried to run BEGIN twice in a row
without an intervening COMMIT or ROLLBACK.
--
D. Richard Hipp <[EMAIL PROTECTED]>


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



[sqlite] Need help understanding SQLITE_ERROR[1] problem

2007-04-13 Thread [EMAIL PROTECTED]
 In the following pseudo-code which works the first time through either
Function A or Function B I get a problem when either function is
executed a second time.

I get the following error:

SQLITE_ERROR[1] - cannot start a transaction within a transaction


Program
{
Open Database
randomly call Function A or Function B a bunch of times
(both functions work the first time through only but hang when called a
second time)

Close Database
}

Function A
{
BEGIN IMMEDIATE
define stmt (INSERT OR REPLACE)
set binds
stmt.execDML();
stmt.reset();
COMMIT TRANSACTION
stmt.finalize();
}

Function B
{
BEGIN IMMEDIATE
define stmt (INSERT OR REPLACE)
set binds
stmt.execDML();
stmt.reset();
COMMIT TRANSACTION
stmt.finalize();
}

I would appreciate any ideas on where to look to eliminate this error.

Roger

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