0

Format of the connection string to access an ACCESS database in c# over network?
I want to make a OleDbConnection in c# and connect it to an access database in another PC on my lan.
This is an example of a connection string to connect to a database on my local computer:
(string strconnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\DOdatabase\Database.mdb"; and it works)
and this is the connection string of the Database which I want to access :
Provider=Microsoft.ACE.OLEDB.12.0;Data Source="C:\Documents and Settings\mchct\My Documents\c#.accdb"
(it`s access2007 and I got this string from the other pc itself,this computer name is HCTADMINS).
So now How can I change the above string to connect to c#.accdb on HCTADMINS from my local PC.

plz write the string for me,
tanx alot

3
Contributors
3
Replies
5
Views
9 Years
Discussion Span
Last Post by Ramy Mahrous
0

First create shared folder on HCTADMINS and set read\write permission.
Let's say we called the shared folder Database Folder
So, connection string be

string strconnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\HCTADMINS\Database Folder\c#.accdb";
-1

I AM USING MS ACCESS 2007 TO CONNECT TO A C# WINDOW APPLICATION BUT I GET AN ERROR SAYING THAT
(An OLE DB Provider was not specified in the connection string. An example would be; 'Provider = SQLOLEDB;').

PLEASE ASSIST WHERE COULD I BE WRONG

REGARDS

Votes + Comments
Don't hijack someone else's thread
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.