Application Path
-
Hi there , Can anyone tell me what apppath does? Can I give apppath to my database in VB 6.0. If yes, then what will happen if I change my location of the database from one server to another, and what should I do if in future I want to change my path of the database? Plz help me out. Thanx & Regards. Success is not a Destination, ... But a Journey !!
-
Hi there , Can anyone tell me what apppath does? Can I give apppath to my database in VB 6.0. If yes, then what will happen if I change my location of the database from one server to another, and what should I do if in future I want to change my path of the database? Plz help me out. Thanx & Regards. Success is not a Destination, ... But a Journey !!
AppPath gives you the directory path of your executable. If using VB6, you can put your connection string in an ini file or the registry. If using .Net then you can put it in the app.config file or the registry. This way you can easily move your database without recompiling your code. Mike Lasseter
-
AppPath gives you the directory path of your executable. If using VB6, you can put your connection string in an ini file or the registry. If using .Net then you can put it in the app.config file or the registry. This way you can easily move your database without recompiling your code. Mike Lasseter
Hi, Sorry but I don't know ur name. First I would like to thank u for ur quik response.But I would b requiring some more help.Plz help. I would like to know in wich ini file should I save the database path,Will I need to give additional attributes of the database like USERID,PASSWORD,LOCKTYPE in that file, and How should I execute that file from the application? Thanx & Regards. Success is not a Destination, ... But a Journey !!
-
Hi, Sorry but I don't know ur name. First I would like to thank u for ur quik response.But I would b requiring some more help.Plz help. I would like to know in wich ini file should I save the database path,Will I need to give additional attributes of the database like USERID,PASSWORD,LOCKTYPE in that file, and How should I execute that file from the application? Thanx & Regards. Success is not a Destination, ... But a Journey !!
You can create your own ini file. Example appliationName.ini. I would place this file in the same directory as your executable. As far as placing the user name and password in this file, I don't recommend it (unless you perform some kind of encryption on the password). Are you using one user id to connect to your database or will everyone that logs in have a different user name and password? What kind of database are you trying to connect to? As for reading and writing to an ini file look at the following link or do a search on google http://www.vbcity.com/forums/topic.asp?tid=20423