'Pending delete' on LDB file from ADODB connection to Access 2.x database



I have to use a (very old!) commercial Access 2.x multi-user
application that I am not allowed to edit or change in any way. (not
just because I don't know how)
I have therefore added some extra database manipulation feature
through a separate application that I have written using VB6 and
ADODB.
The application works fine until I try using it at the same time as
other users are running the original program.

These are the symptoms:
User 1 connects via Access application - ok
I connect via VB app - ok
User 2 connects via Access application - ok
Users can connect and disconnect the Access app ok at this point
I disconnect my VB app - seems ok
Users 1 & 2 can continue to work ok
BUT, no other users can connect, either via the VB or Access apps.
They get a 'Could not lock file' error.
The only way past this point is for all users to disconnect, at which
point everyone can connect again.

I am connecting using a mode of 'share deny none'.
Database access is via network file shares with full access rights
( it also fails locally, so that isn't the problem)
Database locking mode is 0
Database connection control is 2 (i.e normal - NOT passive shutdown)

Tracing with FILEMON give me a good idea of the reason for this
behaviour.

When I hit the 'ADODB.Connection.Close' command in my app, it attempts
to delete the LDB file.
Since this is opened by the other apps, it puts it into a 'Pending
deletion' state.
Once in this state, all new attempts to open the LDB file will fail,
until the existing processes release their handles.

The Access application does NOT attempt to delete the LDB file at
all, yet my ADO connection ALWAYS tries to delete the LDB, whether it
is the last connection or not.

Does anyone know how to control the LDB file deletion behaviour of
ADODB (e.g. can I switch it off?).
I've tried denying delete rights to the LDB, but that doesn't seem to
be successful and isn't really a very practical solution.

Thanks

.



Relevant Pages

  • Re: Please Urgent - Update Data Source Problem ???
    ... When the app starts, I'd check to see if the table exists. ... That'd probably be a preferable method to creating the database each time ... If you put connection close ... schedule, and they can update the existing schedule, add new schedule and ...
    (microsoft.public.dotnet.framework.compactframework)
  • ASP.NET data access
    ... We have used ADO datasets previously for a windows application that we developed where the entire db was loaded into the dataset at the beginning of the application and the user made changes to the dataset which was then saved back to the db when the app was shut down. ... Which means that when data is required it is returned from the dataset saving a connection, but has used a heap of resources loading from the db in the first place. ... We would in this case have insert methods which would then use inserts, updates and deletes to directly update the database. ... The problem that this technique seems to have is that you are creating a dataset in each method, which is failur repetitive and may only contain a few rows. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: OleDbConnection does not release Access database
    ... this is not a web app. ... a Microsoft Access database. ... the database connection, but that seems a little excessive for what ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Access Database - Locked out from Design
    ... It varies as to who is holding the ldb file open --- I think it is whoever ... accesses the database first. ... remotely using remote desktop connection via a VPN. ... permissions issue - maybe your permissions are set up such that only ...
    (microsoft.public.access.tablesdbdesign)
  • Threads
    ... I have an app that connects to a database every 15 seconds to gather data ... has been mostly developed on a broadband connection. ... with threads/processor time. ...
    (alt.comp.lang.borland-delphi)

Loading