oledbconnection.open() - External component has thrown an exception.

Hello,

It is expected behaviour that a oledbconnection.open() call to access database file (mdb) that also has ldb lock file will fail ?

Last week some code I had worked fine, this week it doesn’t and the only thing I can see that’s different is the existence of a lock file in the directory.

The error is being called on oledbconnection.open() and is:

External component has thrown an exception.

Any ideas?
andyw27Asked:
Who is Participating?
 
andyw27Author Commented:
Figured out the problem it was problem between the 32bit and 64bit version of office, fixed by installing the 64bit MDE with the passive switch.
0
 
Jeffrey CoachmanMIS LiasonCommented:
Delete the lock file then try again.

But ultimately you need to investigate why the locking file did not get deleted automatically.
When an Access db is opened, the locking file is created...
Likewise, when the db file is closed, the locking file should be deleted automatically...

JeffCoachman
0
 
deanvanrooyenCommented:
thats weird I would suspect that even a lock would allow an open e.g. to read, what was the exception message?
0
 
andyw27Author Commented:
Fixed myself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.