Problem connecting to Access Database programatically.

  • Thread starter Thread starter Rob Monroe
  • Start date Start date
R

Rob Monroe

I am learning about Visual Basic.Net. The exercise currently is to
programaticically open an OLEconnection to an existent database. I have
checked the code and it is correct. The database is on my home machine, an
MDB file I made myself. When I attempt to connect I get the following
error. "The Microsoft Jet database engine cannot open the file [the
address]. It is already opened exclusively by another user, or you need
permission to view its data." The database is NOT open. I am ABLE to open
it on my machine with no issues. But the error persists. Does anyone have
any suggestions? It seems that Access is not letting someone outside open
the file.
 
When Access opens a *.mdb file, a companion file *.ldb(ext? its been
awhile) is created. That file contains information as to who has opened
the *.mdb file. Access automatically maintains the *.ldb file
automatically creating it and delteing as needed. Sometimes it isn't
deleted which means that Access will think that the *.mdb file is open.
Check the directory in which the *.mdb file exists, if the *.ldb file is
there it means that Access didn't cleanup after itself. WARNING: If you
are ABSOULETY certain that the *.mdb file ISN'T open by anyone, you
should be able to manually delete the file.
 
Back
Top