Hi D. Richard, Thanks for your help, it seems that it worked fine.
Regards, Thiago Mello Em Sex, 2003-11-07 ās 11:46, D. Richard Hipp escreveu: > Thiago Mello wrote: > > > > BEGIN TRANSACTION; > > SELECT id,name FROM TABLE1; > > > > /* now in the callback function */ > > IF argv[1] = "JOHN"; > > UPDATE TABLE1 SET number=n+1 WHERE id=X > > /* return from the Callback function */ > > > > END TRANSACTION; > > > > But I still get a error: "database table is locked". > > Is still something wrong that Im doing? > > > > SQLite does not allow you to read and write the > same table at the same time. You need to finish the > read of TABLE1 before you start changing it. Perhaps > like this: > > BEGIN; > CREATE TEMP TABLE t1 AS SELECT id,name FROM table1; > SELECT id,name FROM t1; > > /* Now in the callback function */ > UPDATE table1 SET number=n+1 WHERE id=X; > /* Return from callback function > > DROP TABLE t1; > COMMIT; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]