----- Forwarded by Ben Carlyle/AU/IRSA/Rail on 07/11/2003 10:03 AM -----

Ben Carlyle
07/11/2003 10:03 AM


        To:     Thiago Mello <[EMAIL PROTECTED]>@CORP
        cc: 
        Subject:        Re: [sqlite] database table is locked






Thiago Mello <[EMAIL PROTECTED]>
08/11/2003 09:00 AM

 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        [sqlite] database table is locked


> Im doing a SELECT sql query, and in the callback function of this sql
> query I do a UPDATE, so when I do this update I get 
> database table is locked.

> How I cant do the UPDATE in the second sqlite_exec() function?!

Either separate the two operations or bring them closer together. To 
separate them do something like:

BEGIN TRANSACTION;
SELECT ...; -- Collate results
-- Action results:
UPDATE ...;
UPDATE ...;
...
UPDATE ...;
END TRANSACTION;

To bring them closer together do something like this:

UPDATE foo = bar WHERE (SELECT ...)

It depends on what your query is and how you want to update the table in 
response to your table data.

Benjamin.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to