MS Access opening exclusivly

Hi,

I am opening an Access DB from my VB.NET application to print a report. The problem is that it opens exclusivly and when then remains locked.

How can I open the DB with out locking it or how do I unlock th db when finished. The DB is on a server and I am using VBA code OpenCurrentDatabase(Filename:=DB Path, Exclusive:=False).

Any Ideas?

Thanks Mike

[364 byte] By [MRMOU812] at [2007-12-16]
# 1
Hi Mike

This Forum is more for VSTO but to assist you on your query a couple of things, MSaccess I presume you are trying to load MDB, Later versions of Access look at the location and permissions to decide best method for opening of the file, the OpenCurrentDatabase with the switch you have specified should work but it is possible if there is insufficient permissions to create the Lock file this may happen also if the MDB is in a different version to the version of Access IE Access 97 MDB loaded in Access 2003

Hope this helps

Mike Walker MVP
Visual Developer VSTO

MikeWalker at 2007-9-9 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 2

Thanks for the help Mike. I solved the problem by adding a Quite cammand in my forms on close event, which unloads the DB and unlocks it.

Thanks again.
Mike

MRMOU812 at 2007-9-9 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...