470,606 Members | 2,436 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,606 developers. It's quick & easy.

I want to run a program, while I have the files of it in 2 folders.

Hello everyone and good morning from Greece.
I need some help, PLEASE.

I made a program that needs a database file (.mdb) to open, if the database file is outside the program folder, creates an error and stoped running.

I dont want to have the database file in the program folder.

Is there any way to create another program, which i will give to it the path from my exe and the path from the database file to connect them some how and run the program?

Thank you
Jun 12 '09 #1
5 1188
236 100+
May be u r using App.Path in your program. If yes, replace it with the full path of the folder containing database file.
Jun 12 '09 #2
Thank you smartchap for your answer, but the reason that i want to make another program to connect them is that my program will run in a difrent os and the database file will be in difrent path from one pc to another.
Jun 12 '09 #3
8,127 Expert 4TB
then how are you going to synch the database ?
Jun 12 '09 #4
236 100+
I think you must develop Client-Server type application for this.
Jun 13 '09 #5
daniel aristidou
491 256MB
why don't u simply use a filedialog for the user to select the database on first use of the program (easily done in new versions of vb. im not sure about older versions) , you can then store this in a text file which is located in the applications folder, or in the registry. Then on start-up make you program retrieve the path of the database to use in your application.
Also it sounds like you are looking for a solution that does not mean rewriting the application, From newer versions of vb, i think (im not 100% sure) the database connection string is stored in a settings file or the registry. (Try querying the registry to see if u can find the connection string in which case you can edit it. )

I think this Article will be of some use
Jun 13 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

21 posts views Thread by Roy Riddex | last post: by
2 posts views Thread by Jon Maz | last post: by
1 post views Thread by Military Smurf | last post: by
1 post views Thread by semedao | last post: by
1 post views Thread by =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.