Link to home
Start Free TrialLog in
Avatar of andyw27
andyw27

asked on

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?
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

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
Avatar of deanvanrooyen
deanvanrooyen

thats weird I would suspect that even a lock would allow an open e.g. to read, what was the exception message?
ASKER CERTIFIED SOLUTION
Avatar of andyw27
andyw27

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andyw27

ASKER

Fixed myself