On April 8, Marco wrote:
OpenConnection(TMP_ConnectionString, OBJ_Connection)

sql= "UPDATE ANG_Operatori Set NomeOperatore = 'Amministratore',UserID =
'admin',ParolaChiave = 'prova',DataUltimoAccesso = '08/04/2012
15:04:00',Supervisore = 1,ID_Dentista = 1 where ID_ANG_Operatore = 1"


 Execute("BEGIN TRANSACTION")   '''''''''''''''''''''("BEGIN EXCLUSIVE
TRANSACTION")
 Execute(SQL)
 Execute("END TRANSACTION")

//

According to http://www.sqlite.org/lang_transaction.html , "An attempt to invoke the BEGIN command within a transaction will fail with an error, regardless of whether the transaction was started by SAVEPOINT or a prior BEGIN."

That alone would be enough to suggest the above code should be avoided. The SQLite3 shell throws an error when given the second "BEGIN ..." command.

With this code the db don't save.

Are you checking for error returns? (I would guess not. In that case, your first fix should be to check every single call into SQLite that can return an error.)

If I add 'EXCLUSIVE' the program stop after 30 seconds and return "The
database file is locked"

Probably the first transaction is still in effect.

If I remove the transaction some result.

Show us the code that fails. It's alright to cut out what is truly irrelevant, but please do not submit pseudocode.

With MS access this query work without need to insert transaction.

I see no queries here at all, so I cannot judge what "this query work" means.

How I can solve this problem ?

Too little information to guess.

--
Larry Brasfield
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to