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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Project distribution on server

Status
Not open for further replies.

nkyeshi01

Programmer
Nov 4, 2004
29
US
Hello once again to all!

ok I have my project, but here is the thing I want to install my program on the local machines and the DB on the server, the thing is that on each machine the mapping of the server is going to be under a diferent drive(e.g E:\, F:\, X:\files\etc..) SO:

OPTION 1 : when the program is installed for the first time, it opens a text box where I ask for the mapped path to the server and move the database to there (data.databasename = mappedPath & DBname ) Knowing that by "default" the DB is placed where the .exe is, HOw do I move de DB to the mappedpath? and when I run the program again,will it go to that path as well?.

OPTION 2: use the registry??? and here I don't know how to


Please help, if you have any other idea or correct mine..


Thank you all
 
Why not try to reference your database like this
"\\Server\Directory\Database"
That way you would not have to rely on a mapped drive.
 
but if I don't know the \\server\directory\ names, this program will be installed with different clients, and the names are going to change.

Maybe I missunderstood you

Thanks for answering
 
Here is what I suggest. Intead of using a mapped drive. reference the location of the database by using that method (as long as the Client PC is Windows 2000 or greater)
Use VB's SaveSetting and GetSetting.
Use SaveSetting with your textbox entry to save to the registry, then when you run the program use GetSetting to retrieve it.
Here is some sample code of using the two.

DB = GetSetting "AppName", "Data", "ServerPath")

savesetting "AppName","Data","ServerPath","\\Server\Directory\Database"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top