Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA: connection string ignored

Status
Not open for further replies.

JWP2

Programmer
Jun 1, 2005
1
US
I've developed a MSAccess 2003 application which begins with a login screen. The user-id and password entered is verified in a table on the server. The program code (saved in MDE format) resides on the workstation. The code contains a hard-coded connection string which looks like this:

cn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=\\Server1\TestApp\userinfo.mdb;Jet OLEDB:Database Password=password"

A share is set up on the server to translate "\\Server1\TestApp" to the location where userinfo.mdb is stored.

This works fine on all the workstations on the network EXCEPT one. The problem workstation always looks for the userinfo.mdb database in the local MyDocuments folder of the person who is logged on rather than in the shared folder on the network and so it cannot find it. If I type \\Server1\TestApp onto the Run command line on this workstation, it resolves properly and goes to the right directory with no problem.

Inside the MDE, the default database directory is also set to \\Server1\TestApp. But I am wondering where else directory defaults could be set which are overriding this MSAccess setting and my program code.

Could a security setting on this individual workstation be preventing my code from running?

I would appreciate any suggestions. Thanks very much!

Janet
 


Hi Janet,

So what do you do with cn?

Please post ALL your code.

Skip,

[glasses] [red]Be Advised![/red] The only distinction between a bird with one wing and a bird with two, is merely...
a difference of A Pinion! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top