Re: Access can-t open the database error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



The other user could be you if you haven't cleaned up and closed your
recordsets, or there is a dangling .ldb file that Access can't get rid of.
Another possibility is that your permissions are not allowing an .ldb file
to be created, so Access will only allow the first instance in memory. The
..ldb file is how Access keeps track of record locks and you need to have
everything except Full Control on the folder where the application resides
in order to guarantee that there will not be a permissions problem.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"tec-goblin" <tecgoblin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3A95B7A4-FA7B-4049-A822-CA4F0A159270@xxxxxxxxxxxxxxxx
"Norman Yuan" wrote:

What type is your C# application? Win Form or Web app? If it is Win form,
can you try specify a full path+filename?
It is winForm and I tried a full path + filename already. (it is actually
a
very long path, but it remains below 200 characters and a very similar one
works perfectly with Excel and Word interop). I also moved the application
to
the root and tried with a simpler and smaller path, and still it didn't
work.

Any ideas?

"tec-goblin" <tecgoblin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EB92EFDE-4278-472D-9A58-AF8013463DDA@xxxxxxxxxxxxxxxx
I have a C# application that uses access interop to do the following:
Microsoft.Office.Interop.Access.Application access = new
Microsoft.Office.Interop.Access.ApplicationClass();
access.AutomationSecurity =
Microsoft.Office.Core.MsoAutomationSecurity.msoAutomationSecurityLow;
access.OpenCurrentDatabase(@"TG Client.mdb", false,
string.Empty);

And I get
"Microsoft Office Access can't open the database because it is missing,
or
opened exclusively by another user."

This happened to me on Vista (so it could be UAC? I didn't have any
problems
with the creation of Word documents, though).
btw, I've checked other paths (TG Client is saved on the Debug\bin
folder),
and of course I don't have the application open.

Any suggestions? Thanks in advance!





.



Relevant Pages

  • Re: copying a backend from within frontend
    ... all recordsets are closed. ... As long as an LDB file exists then it is "in use". ... usenet at dfenton dot com http://www.dfenton.com/DFA/ ...
    (comp.databases.ms-access)
  • Re: copying a backend from within frontend
    ... recordsets are closed. ... You can check for the presence of the LDB file in the same directory. ... RBrandt at Hunter dot com ...
    (comp.databases.ms-access)