0

Hi everyone,
I am attempting to access a database that is located in a shared server/ directory "K:\". Assuming I don't know where the database is located, how can I programatically tell vb to locate this database by searching all the network server directory?
My database name is called:
PTS.mdb

Currently I copied the database into my local drive
"C:\PTS.mdb" => for testing purposes.

This is how I'm accessing the database now:

Dbpath = "C:\" 
DbName = "PTS" 

Set Db = OpenDatabase(Dbpath & DbName) 

Any input will be greatly appreciated.
Thanks.
tgif

Edited by Dani: Formatting fixed

2
Contributors
2
Replies
5
Views
9 Years
Discussion Span
Last Post by debasisdas
0

Sorry my previous post wasn't properly formated.

VB6 - Locate/Access Database in a Server directory

Hi everyone,
I am attempting to access a database that is located in a shared server/ directory "K:\". Assuming I don't know where the database is located, how can I programatically tell vb to locate this database by searching all the network server directory?
My database name is called:

PTS.mdb

Currently I copied the database into my local drive

"C:\PTS.mdb"

=> for testing purposes.

This is how I'm accessing the database now:

Dbpath = "C:\" 
DbName = "PTS" 

Set Db = OpenDatabase(Dbpath & DbName)

Any input will be greatly appreciated.
Thanks.
tgif

0

How do you expect the application to open the database without knowing its location. It never happens that application will run without knowing the location of an access database . You have the option of asking the user to specify the database location initially at the start of the application.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.