may be this snip from manual can show the way: <<snip You can decide whether or not you want a client disconnect to cause your script to be aborted. Sometimes it is handy to always have your scripts run to completion even if there is no remote browser receiving the output. The default behaviour is however for your script to be aborted when the remote client disconnects. This behaviour can be set via the ignore_user_abort php.ini directive as well as through the corresponding "php_value ignore_user_abort" Apache .conf directive or with the ignore_user_abort() function. If you do not tell PHP to ignore a user abort and the user aborts, your script will terminate. The one exception is if you have registered a shutdown function using register_shutdown_function(). With a shutdown function, when the remote user hits his STOP button, the next time your script tries to output something PHP will detect that the connection has been aborted and the shutdown function is called. This shutdown function will also get called at the end of your script terminating normally, so to do something different in case of a client disconnect you can use the connection_aborted() function. This function will return TRUE if the connection was aborted
snip>> i think there can be 2 solutions: 1. ignore the client disconnect 2. register a shutdown function which suitable releases the locks and destroys COM object. regards, -----Original Message----- From: Bob Irwin [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 06:53 To: [EMAIL PROTECTED] Subject: Access DB & PHP Hi guys, I have a client who insists on using PHP and an Access database. He describes a problem with the access databases becoming locked when a user clicks 'stop' in their browser whilst downloading the page (and I have to stop the IIS server to release it). I have absolutely no experience with PHP/Access connections, so I thought I'd ding it along and see if the elite PHP programmers of the world can pick up an error in his code. > > I connect like this: > $conn = new COM ('ADODB.Connection'); > $conn->Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data > Source='c:\\home\\westir\\data\\libcat.mdb'"); > $sql = "SELECT * FROM tbl_name "; > $result = $conn->Execute($sql); > > // deal with the database generated information > > $result->Close() > $conn->Close Is there a better way to do this? Best Regards Bob Irwin Server Admin & Web Programmer Planet Netcom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php