Hello everyone,
I have written a small piece of code to connect MS access database with Asp.net..
con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " + "Data Source=" + Server.MapPath("~/MYDB.mdb"));
con.Open();
I have hosted this website in win server 2008 it gets connected , but during insert query it says "Operation must be an updateable query"
my access db is having full rights..with full control..
whereas the same thing when hosted on win server 2003.. it doesnt gives any error..
I need it in win server 2008
To get rid of this , i have look for an another option to get connection with DSN .. but in win server 2008 i couldnt find MSAcess driver..
for this i have used 32 bit ODBC exe.. and created DSN with the db..
now i have written this piece of code :
protected void Page_Load(object sender, EventArgs e)
{
OdbcConnection DbConnection = new OdbcConnection("DSN=MYDSN");
try
{
DbConnection.Open();
}
catch (Exception ex) { throw ex; }
finally { DbConnection.Close(); }
}
But it says :
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
Please suggest me any way so that i could get insertion of records in MS Access through Asp.net in win server 2008
Thanks
Krunal