Click here to Skip to main content
16,017,488 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

I've developed an application for school on vb.net and ms-access database. I've experienced its deployment on stand alone computer and cheers.. Now i need to deploy it on local intranet of 4-5 PCs. But i don't know how to achieve this. I want my application to access database from a central point and all users uses the same database. I need a help on it. Thanks

Ovais
Posted
Comments
walterhevedeich 4-Nov-13 2:28am    
1. Put your database on a location that is accessible(through network) by the target PCs.
2. Utilize the connection string property of your application's App.Config. In the connection string, put the IP, user name, password, and other required information. Do not hardcode the connection on your code.
Ovais Memon 4-Nov-13 4:30am    
Thanks, let me try and get back to you..

The thing to look at is the "connection string" which is normally set in the .exe.config file.
That means: deploy your database somewhere, adjust the connection string in the .exe.config file, and then deploy your application with the modified .exe.config file. The last step (deploy the modified file) could be achieved by a custom action in the msi or by a software distribution system.
 
Share this answer
 
Comments
Ovais Memon 4-Nov-13 2:54am    
Bernhard, Kindly see the connection string below.. (In solution).
Bernhard Hiller 4-Nov-13 3:20am    
"Data Source=|DataDirectory|\UltraSchoolDB.mdb"
Replace |DataDirectory| with the path to the shared folder, e.g.
"Data Source=\\YourServer\YourShare\UltraSchoolDB.mdb"
Ovais Memon 4-Nov-13 4:30am    
Ok, let me try and get back to you.. Thanks
1.Locate your database file on a server machine.

2.Modify your connection string to access it.
if your using OLEDB driver to connect to access you can use connection string as
Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=\\server\share\folder\myAccessFile.accdb;

3. Find OLEDB data provider on your machine and modify connection string.

--
Thanks
 
Share this answer
 
HTML
<connectionstrings>
        <add name="ConnectionString1">
            connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\UltraSchoolDB.mdb;Persist Security Info=True;Jet OLEDB:Database Password=mypassword"
            providerName="System.Data.OleDb" />
    </add></connectionstrings>
 
Share this answer
 

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