Click here to Skip to main content
15,879,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone,
I have a mdb file in LAN server(Shared location). I have to deploy my VB.Net application in 4 systems.

What am looking for is,
When i deploying my application in a system, it should ask DB location to mention. So that i can browse to shared location mdb file. And my application will use that DB for insert/modify functions.
Similar for remaining systems. So that all systems in LAN will use the same DB.

Now my question is,
Is it possible when deploying an application, we can make system to ask for DB location?
Is there any other way to achieve the same?
Posted

1 solution

Yes it is possible.

By the which database are you using? mdb file means are you using MS Access?


If so build your connection string with password use following

CSS
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=DB_PATH;
Jet OLEDB:Database Password=MyDbPassword;


While running application for the first time ask user to provide network path of the mdb file and use it in connection string in place of DB_PATH and connect to database.

Connection string without password

CSS
Provider=Microsoft.ACE.OLEDB.12.0;Data SourceDB_PATH;
Persist Security Info=False;
 
Share this answer
 
Comments
Vml_Newbie 1-May-14 6:10am    
Thanks for quick response rahul. <br>
"connection string with password" - Where should i set the password? In DB or somewhere?<br>
"While running application for the first time ask user to provide network path of the mdb file" - That is i should add seperate code for asking n/w path in form right?<br>
 <br>

One more thing, How am supposed to know the user is opening the application 1st time?

When i surfing, Found that the User Editor in setup project having some dialogs. Can i customize that so that i can ask the user to browse the mdb file during the installation period itself?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900