Groups | Blog | Home
all groups > dotnet datatools > march 2005 >

dotnet datatools : Relative Paths For OleDBAdapter Control


GingerNutsOK
3/21/2005 10:45:07 AM
Is it possible to have a "relative" path to an Access DB that will satisfy
all 3 cases:-

(1) Running from IDE
(2) Running exe with db in same directory (anywhere)
(3) Running exe in IDE bin directory with db in project root

Thanks

Bernie Yaeger
3/23/2005 5:34:37 PM
Hi Ginger,

I'm not sure what you're after. Effectively, when you run from the IDE, you
are running from the IDE's bin sub, so 1 and 3 are the same. Of course, the
mdb can be in the same subdirectory, but your connectionstring makes an
absolute reference to a path, and that controls where it expects to find the
mdb file.

In most cases, a system is set up to run against a networked drivespec and
the connection leads all users to the same spot - f:\apps\mysys\test.mdb.
In truth, the exe can now be anywhere, since the connection string
determines where it goes to access the .mdb.

Bernie Yaeger

[quoted text, click to view]

AddThis Social Bookmark Button