Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1691
  • Last Modified:

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?
0
andyw27
Asked:
andyw27
  • 2
1 Solution
 
Jeffrey CoachmanCommented:
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:
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
 
andyw27Author Commented:
Fixed myself
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now