Hi all
I 'm using ASP and ADO and I want add a new record to a table. I can read from table correctly, but when I try to add a record, I get this error :
"Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only."
This is my code :
<%
Dim objConn
Set objconn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString ="provider=microsoft.jet.oledb.4.0;data source=d:\db1.mdb"
objConn.Open
Dim objRst
Set objRst = Server.CreateObject("ADODB.Recordset")
objRst.Open "users",objConn,,3,adCmdTable
objRst.addnew
objRst("user_Name")=Request("name")
objRst("user_Family")=Request("LastName")
objRst("user_Age")=Request("Age")
objRst.update
%>
Is there any error in code? or there 's a problem with my .mdb file ?
I 'm using ASP and ADO and I want add a new record to a table. I can read from table correctly, but when I try to add a record, I get this error :
"Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only."
This is my code :
<%
Dim objConn
Set objconn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString ="provider=microsoft.jet.oledb.4.0;data source=d:\db1.mdb"
objConn.Open
Dim objRst
Set objRst = Server.CreateObject("ADODB.Recordset")
objRst.Open "users",objConn,,3,adCmdTable
objRst.addnew
objRst("user_Name")=Request("name")
objRst("user_Family")=Request("LastName")
objRst("user_Age")=Request("Age")
objRst.update
%>
Is there any error in code? or there 's a problem with my .mdb file ?