how to connect Sqlcompact via. OleDbConnection
my code:
string strConn = "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5; Data Source=C:\\newservice\\UserDataBase\\demo1.sdf;Password=MyPassword";
conn = new OleDbConnection(strConn);
conn.Open();
DataTable dtTable = new DataTable("Record");
OleDbDataAdapter ada = new OleDbDataAdapter("select * from demo", conn);
ada.Fill(dtTable);
conn.Close();
i have got this error:
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
how to solve this. wats the problem over here...?