Hi All
WinXPPro
Access 2002 SP3
Here's a circle I've been going around for several hours now.
In the Open event of a Form i re-create some temporary tables. These temporary tables are intended to be unique to the individual user. I re-create these from a set of "permanent" tables in order to pick up any design/field changes etc in the permanent set. I also do this so that if the user's system has crashed I can "re-set" form bindings and so on.
In the form's Open event, I first Drop the old temporary tables before re-creating them. Unfortunately, if, indeed, the system has crashed out... my Drop tables fail with the jolly old Error 3211 "The database engine could not lock table xxxx because it is in use by another person or process" ... of course there are no other users and even re-starting Access does not clear the problem.
I believe this is because a sub-form may still have a binding reference to the temporary table... hahaa I hear you say, remove the binding reference(s) before re-creating the tables... but not so fast, my Access chums..... at this point it's not possible to do that because the sub-forms have not yet been initialised! Grrrr....
I looked at SQL Drop Table in the hope there might be a way to force the table delete despite the locks.... but if there is it's a well kept secret ... probably only known to the SQL Inner Sanctum!
Is there any way to delete the locks programatically or get around this problem in some other way?
Thanks so much for helping me keep my stress levels down! Look at it this way, you are helping the (UK) National Health Service save a fortune!
WinXPPro
Access 2002 SP3
Here's a circle I've been going around for several hours now.
In the Open event of a Form i re-create some temporary tables. These temporary tables are intended to be unique to the individual user. I re-create these from a set of "permanent" tables in order to pick up any design/field changes etc in the permanent set. I also do this so that if the user's system has crashed I can "re-set" form bindings and so on.
In the form's Open event, I first Drop the old temporary tables before re-creating them. Unfortunately, if, indeed, the system has crashed out... my Drop tables fail with the jolly old Error 3211 "The database engine could not lock table xxxx because it is in use by another person or process" ... of course there are no other users and even re-starting Access does not clear the problem.
I believe this is because a sub-form may still have a binding reference to the temporary table... hahaa I hear you say, remove the binding reference(s) before re-creating the tables... but not so fast, my Access chums..... at this point it's not possible to do that because the sub-forms have not yet been initialised! Grrrr....
I looked at SQL Drop Table in the hope there might be a way to force the table delete despite the locks.... but if there is it's a well kept secret ... probably only known to the SQL Inner Sanctum!
Is there any way to delete the locks programatically or get around this problem in some other way?
Thanks so much for helping me keep my stress levels down! Look at it this way, you are helping the (UK) National Health Service save a fortune!
