Unable to update database due to MS Access files locked -> ODBC transactions/commit/rollback problem

From: Date: Thu, 14 Sep 2000 22:21:43 +0000
Subject: Unable to update database due to MS Access files locked -> ODBC transactions/commit/rollback problem
Groups: php.general 
Request: Send a blank email to php-general+get-16844@lists.php.net to get a copy of this message
Hi, Unexplicably I managed to set my MS Access files locked at the server => they are opened as if there was a database connection to them, but in fact what happened was that my script aborted on a SQL error and probably did not issue the correct transaction ending commands, such as a rollback or a commit. The problem happened apparently after I turned 'odbc_autocommit' to OFF and the script ended before performing some correct closing of the connection. When executing a PHP script to access the database again I receive the following error: -------- Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Could not update; currently locked by user 'admin' on machine 'NTS04'., SQL state S1000 in SQLExecDirect in d:\inetpub\ftproot\mydir\myscript.php on line 90 -------- And also I cannot delete the files at the server via FTP recieving the following error, since the files are open: -------- 550 myfile.mdb: The process cannot access the file because it is being used by another process. !Delete of myfile.mdb failed 550 myfile.ldb: The process cannot access the file because it is being used by another process. !Delete of myfile.ldb failed -------- I only have FTP access to this server which is running PHP4 over NT and IIS. And I think I cannot close this connection since I probably should be reusing the handle of the open connection, which I don't have. TIA, Paulo

« previous php.general (#16844) next »