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

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";

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

commented: Don't hijack someone else's thread -1

Give me your connection string

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.