N
Nick Van Dyck
Hello!
This is the code, the error is described below.
string tmp_value_1 = txtName.Text;
string tmp_value_2 = txtMessage.Text;
OleDbConnection dbConn = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data
source=..../T4.mdb");
OleDbCommand dbComm = new OleDbCommand();
dbComm.CommandText = "QRY_SHOUTBOX_INSERT";
dbComm.CommandType = CommandType.StoredProcedure;
dbComm.Connection = dbConn;
OleDbParameter dbParam = new OleDbParameter("@NAME", DbType.String);
dbParam.Value = tmp_value_1;
dbComm.Parameters.Add(dbParam);
dbParam = new OleDbParameter("@MESSAGE", DbType.String);
dbParam.Value = tmp_value_2;
dbComm.Parameters.Add(dbParam);
dbParam = new OleDbParameter("@IP", DbType.String);
dbParam.Value = HttpContext.Current.Request.UserHostAddress.ToString();
dbComm.Parameters.Add(dbParam);
dbConn.Open();
//dbComm.ExecuteReader();
dbComm.ExecuteNonQuery();
dbConn.Close();
VS.NET gives me this error:
Operation must use an updateable query
The query QRY_SHOUTBOX_INSERT is working fine in MS Access, but won't work
with this code. Anybody got an idea? I tried altering the security of the
database (adding the iusr_machine an giving it full control, including the
directory where the database is located).
Greetz!
Nick
This is the code, the error is described below.
string tmp_value_1 = txtName.Text;
string tmp_value_2 = txtMessage.Text;
OleDbConnection dbConn = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data
source=..../T4.mdb");
OleDbCommand dbComm = new OleDbCommand();
dbComm.CommandText = "QRY_SHOUTBOX_INSERT";
dbComm.CommandType = CommandType.StoredProcedure;
dbComm.Connection = dbConn;
OleDbParameter dbParam = new OleDbParameter("@NAME", DbType.String);
dbParam.Value = tmp_value_1;
dbComm.Parameters.Add(dbParam);
dbParam = new OleDbParameter("@MESSAGE", DbType.String);
dbParam.Value = tmp_value_2;
dbComm.Parameters.Add(dbParam);
dbParam = new OleDbParameter("@IP", DbType.String);
dbParam.Value = HttpContext.Current.Request.UserHostAddress.ToString();
dbComm.Parameters.Add(dbParam);
dbConn.Open();
//dbComm.ExecuteReader();
dbComm.ExecuteNonQuery();
dbConn.Close();
VS.NET gives me this error:
Operation must use an updateable query
The query QRY_SHOUTBOX_INSERT is working fine in MS Access, but won't work
with this code. Anybody got an idea? I tried altering the security of the
database (adding the iusr_machine an giving it full control, including the
directory where the database is located).
Greetz!
Nick