Jump to content

Proze

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Proze

  1. Greetings All, Ive come out of lurkdom as I have Encountered an Odd (possible) bug in THe SQLite Code. Briefly: The Following Code is Suffiecent to Cause the Error #include <SQLite.au3> Local $myQuery, $queryStorage _SQLite_Startup () _SQLite_Open ("my.db") _SQLite_Execute(-1, "CREATE TABLE test (a,b,c);") _SQLite_Execute(-1, "INSERT INTO test (a,b,c) VALUES ('testing1', 'testing2', 'testing3');") _SQlite_Query(-1, "SELECT a FROM test WHERE a = 'testing1';", $myQuery) _SQLite_FetchData($myQuery, $queryStorage) MsgBox(0,"testing1",$queryStorage[0]) $test = _SQLite_Execute(-1, "UPDATE test SET a='changeme' WHERE a ='testing1';") MsgBox(0,"Testing Update",$test) _SQLite_Execute (-1, "DROP TABLE test") _SQLite_Close() _SQLite_Shutdown() What Occurs is that the UPDATE statement Returns an error Code of 6 stating that a Table in the DB is Locked. If you perform the "UPDATE" snippet first then you can run any number of Querys afterwards with no problems whatsoever. After Some Reading through the SQLite Documentation on the Locking Mechanism's It seems that the SELECT statement is Not completing and Releasing its Lock on the Table. However if you insert a second SELECT Immediatly After the UPDATE then the second SELECT works fine. Proze
×
×
  • Create New...