I have Website which works fine on localhost but not on server when uploaded, it is giving an error as Operation must use a updatable query
Code is as follows:
OleDbConnection myCon;
string path = @Server.MapPath(".") + "/Accomdation1.mdb";
myCon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path);
myCon.Open();
string f = TextBox1.Text;
string g = TextBox5.Text;
string d = DropDownList1.Text;
string a = TextBox2.Text;
string h = TextBox7.Text;
string k = TextBox6.Text;
string u = TextBox8.Text;
string y = TextBox9.Text;
OleDbCommand cmd = new OleDbCommand("INSERT INTO Accomdation (lastname, firstname,gender,UHCLID,Dateofarrival,timeofarrival,flightno,emaildi)" + " VALUES('" + f + "', '" + g + "', '" + d + "', '" + a + "', '" + h + "', '" + k + "', '" + u + "', '" + y + "')", myCon);
cmd.ExecuteNonQuery();
// TextBox1.Text = e1.Message;
myCon.Close();