-
Hallo
I have a problem that I can't seem to solve. My application is running from a server. Because of multi-users, we do not hard code the directory in which the database is situated, because every user may have a different mapped drive to the server. The user, by using the commondialog box, import files from C-drive, other computers over the lan ect. Everytime the imported the first file, the directories of all my Adodc ect. point to the drive where the file is. In other words, my databse is lost by the application. Can you prevent this from happening? If so, how? (without hard coding the directory)
I would appreciate any help received.
Thank you
-
Either use ODBC and set up a link to the DB from the PC's
or you can write code to map the drive your self. I have some code at home somewhere which lets you use the API to map a drive.
So your code could check which drive letters are free, map //databaseServer/ to the letter and pass the letter to the app to use, then on unload app you can un map the drive.
or if you are sure that X: drive is free then map there.
tell me if you think that will help and I'll post the code
-
Paul,
I would like to see that code if you can spare it. I had a request to map a drive from VB, but still being new to VB I have no clue how to accomplish it.
Thanks !