-
April 11th, 2005, 09:58 AM
#1
Database path
I have a VB application that runs on a client computer and the Access database for the application is sitting on a server. The system is networked and I have a map drive to the database on the server which is a shared file. That mapped drive is coded into the application to gain access to the database. I am having some problems accessing some of the reports on the Access database and in my troubleshooting I want to try to write a message out that would tell me what path it is accessing when it goes to the database for information. I tried using App.Path but that only gives me the path of the application on the client machine. Is there a command or function that could read the networked database path and tell me what my program is really trying to access?
Thanks
Kim
-
April 11th, 2005, 10:17 AM
#2
Re: Database path
Hi,
There are two options here
1. If you are using ADO Code to connect to the database then one method of displaying which database it is accessing will be
Code:
YourConnectionObject.Properties(7).Value
2. If you are ADO Control then simply print the connection string of the data control....
-
April 11th, 2005, 10:23 AM
#3
Re: Database path
When you map a network drive onto your computer, you are effectively creating an alias (i.e "\\server\database\" becomes "P:\").
Why do you think the database path your program is trying to access would be different than the one that is hardcoded into it? If the database path isn't hardcoded in, you should look in the registry, file or whatever method you used to save the database path.
Now access has a tendancy to lock up if too many people are trying to use it at once (its not a great multi user database). You could always try MySQL.
Good Luck
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook
0100 1101 0110 1001 0110 0011 0110 1000 0110 0001 0110 0101 0110 1100 0010 0000 0100 0101 0110 1100 0110 1100 0110 0101 0111 0010
-
April 11th, 2005, 11:28 AM
#4
Re: Database path
I think the database path may be different because I can access the database for entry and retrieval on my forms but not to look at the reports. It gives me an error. So I am trying to see what path it is trying to access when I look at the reports.
Thanks I will try the code to get the value of the connection object.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|