-
Path question.
Hey all.
I have a VB program that links to a database using ADO. I'm not coding my connection string just using the properties dialog box. Under the connection tab I just have the name of the database not the full path . I do this because some times I use a different computer or move the application folder. My problem is that I have a menu command that opens up a common dialog box to choose a wave file. The wave files are in a folder in the application directory. When I do this it causes the connection to look in the wave folder and of course the DB is not there. I guess since I just have the name of the DB in the database field it doesn't know exactly where to look and just looks in the last folder accessed. Is there a way to force it to use a relative path (I have done this in other sections of my program with App.path & "file name") in the properties dialog box??
Sorry for the confusing post. Hope someone understands this and knows the answer.
-
Re: Path question.
Im not sure to fully understand...
Only relative folders that i know are app.path and windows directory.
If the DB is always in the application folder then why arent you using App.path & "file name"?
-
Re: Path question.
I'm trying to do this in the properties box not using code. The app.path doesn't work (or I'm not doing it right) in the properties box.
-
Re: Path question.
When you say "using ADO", do you actually mean that you are using the dreaded (ADO) data control?
If so, you may be able to use "app.path" via code, and then refresh the data control (for help on that bit, see the relevant part ofthe DB FAQ [link below]).