G
Guest
Hey all.
I'm confused. I'm trying to add a single record into an Access 2000 database
using ASP.Net. Here is the code:
objConn = New OleDbConnection(strConnect)
objConn.Open
objCommand = New OleDbCommand("INSERT INTO LOGIN_MASTER (LOGIN_ID, PWD,
F_NAME, L_NAME, TYPE_ID) VALUES ('" & strEmail & "','" & strPwd & "','" &
strFName & "','" & strLName & "','" & strType & "')",objConn)
objCommand.ExecuteNonQuery()
objConn.Close
However, when I try to run it, I get the following error:
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Operation must use an
updateable query.
It highlights the line "objCommand.ExecuteNonQuery()" as the source of the
error. That error seems entirely out of sorts for what I thought
ExecuteNonQuery() is intended for - running SQL statements against your db
that don't return recordsets. Anyone see what could be causing the problem?
I'm confused. I'm trying to add a single record into an Access 2000 database
using ASP.Net. Here is the code:
objConn = New OleDbConnection(strConnect)
objConn.Open
objCommand = New OleDbCommand("INSERT INTO LOGIN_MASTER (LOGIN_ID, PWD,
F_NAME, L_NAME, TYPE_ID) VALUES ('" & strEmail & "','" & strPwd & "','" &
strFName & "','" & strLName & "','" & strType & "')",objConn)
objCommand.ExecuteNonQuery()
objConn.Close
However, when I try to run it, I get the following error:
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Operation must use an
updateable query.
It highlights the line "objCommand.ExecuteNonQuery()" as the source of the
error. That error seems entirely out of sorts for what I thought
ExecuteNonQuery() is intended for - running SQL statements against your db
that don't return recordsets. Anyone see what could be causing the problem?