Access filepath problem

ABOU

Member
Joined
Apr 29, 2008
Messages
14
Programming Experience
Beginner
I have a bit of code im using to call a database file:

VB.NET:
oAccess.OpenCurrentDatabase _
            (filepath:="E:\Documents and Settings\kyle\My Documents\Craig\Tech Yr2\Sem 2\Jim\GT2000\slnGT2000\GT2000\GT2000.mdb", _
            Exclusive:=True)

The code works when calling from that location, which is the location of the database of my project, only thing is if i use the code:

VB.NET:
'Open a database in exclusive mode:
            oAccess.OpenCurrentDatabase _
            (filepath:="|DataDirectory|\GT2000.mdb", _
            Exclusive:=True)

I get an error saying:

Microsoft Office Access can not open the database because it is missing or opened exclusivly by another user or is not an ADP file.

I might not have amended the code correctly...
 
Back
Top