Hi Ben Carlyle, First of all, thanks for your help!
I can't brig these two operation togethe causa I need the result of the SELECT in a if condition. So, what I did was separate with transaction, soh I did something like this: 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? Thanks again, Thiago Mello Em Qui, 2003-11-06 ās 22:03, [EMAIL PROTECTED] escreveu: > > 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 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]