Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My application is in C#,WPF,VS2008 and it is LAN application where one machine is server and other 15 machine are client..my database is MS access which on server machine and all client can acess that database..then what path shgould i provide in client application...in this section..
conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Software Development\vishal_wpf\vishal_WPF\MT_2008_WPF\MT_SERVER\MT.mdb";



this D drive is on server machine where server application is running..what path should i provide in client application in this connection string...
Posted

You need to provide the network location to the server -
Data Source=\\serverName\shareName\folder\myDatabase.mdb.
 
Share this answer
 
v2
Comments
vishal_h 4-Jun-11 2:45am    
thnk you..is it right sir whether i am correct..
Server name means the machine name where server application running..
share name i didnt understand..
folder means whithin that database inside in server machine..
in your case use:
Source=\\Server Name\D:\Software Development\vishal_wpf\vishal_WPF\MT_2008_WPF\MT_SERVER\MT.mdb";
 
Share this answer
 
Comments
vishal_h 4-Jun-11 4:45am    
thank you sir..but if i want to deploy that application on client machine and client doesnt have D:\drive ..means what standrd path should i provide..it is right if i provide path like.. string path = AppDomain.CurrentDomain.SetupInformation.ApplicationBase ; conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+path +@"\info.mdb";

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