8
Answers

What is the problem in connection string of my program?

What is the problem of connection string that can not connect to the access database please,Guide me.
 
 
 
 
 
 
public DataTable ShowData(string s1)
{
OleDbConnection CN = new OleDbConnection();
CN.ConnectionString = "provider = microsoft.Ace.oledb.12.0; Data source = D:\\Database 10.accdb";
CN.Open();

OleDbCommand CMT = new OleDbCommand(s1, CN);
OleDbDataReader da = CMT.ExecuteReader();

DataTable DT = new DataTable();
DT.Load(da);
CN.Close();
return DT;
}

 

Answers (8)