I have a c # application installed on your computer first, and the database on the second computer, how can access to the database >>> note ...that the type of database is Access
database
How to access the database over the network
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Biswa Pujarini MohapatraRank #463 · 5.4K pointsPosted Jan 26, 2014, 5:38 AM EST
public void ConnectToAccess() { System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(); // TODO: Modify the connection string and include any // additional required properties for your database. conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data source= C:\Documents and Settings\username\" + @"My Documents\AccessFile.mdb"; try { conn.Open(); // Insert code to process data. } catch (Exception ex) { MessageBox.Show("Failed to connect to data source"); } finally { conn.Close(); } }lamasat lamasat46 pointsPosted Jan 26, 2014, 9:36 AM EST
Biswa Pujarini MohapatraRank #463 · 5.4K pointsPosted Jan 27, 2014, 8:06 AM EST
in your case you have to store your db in a shared location and give that folder necessary permission
hope it helps