W
wwwaynes
Unable to AddNew or SQL insert to add records to Access
database. Seems to occur with any database even when I try
the samples like Northwind and borrowed code. Have been
over and over database setup to insure it is not read
only. Contacted a MS support professional who thought it
was the browser scripting security, but changing didn't
seem to help.
Error Message
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
This occurs at the AddNew line in the following code:
<% @Language = VBScript %>
<% Option Explicit %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<!-- This is basically a data processing document that
when finished stores responses to a data base table
hradmin -->
<!--METADATA TYPE="typelib"
FILE="C:\Program Files\Common
Files\System\ado\msado15.dll"-->
<html>
<head>
<title>Process HR Admin</title>
</head>
<body>
<%
'Need to figure out why this recordset is read-only
Dim strCoID, intCoID
strCoID = Request.form("CoID")
intCoID = CInt(strCoID)
Response.Write intCoID
Dim objConnect
Set objConnect = Server.CreateObject("ADODB.Connection")
Dim strConnect
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\wwwroot\SRRMkt\Mkt.mdb;Persist Security
Info=False"
Dim objRS
Set objRS = Server.CreateObject ("ADODB.Recordset")
objRS.Open "HR1", strConnect, adOpenKeyset,
adLockOptimistic, adCmdTable
'objRS.MoveLast
objRS.AddNew
'objRS("CoID") = intCoID
objRS.Update
objRS.Close
Set objRS = Nothing
objConnect.Close
Set objConnect = Nothing
%>
</body>
</html>
database. Seems to occur with any database even when I try
the samples like Northwind and borrowed code. Have been
over and over database setup to insure it is not read
only. Contacted a MS support professional who thought it
was the browser scripting security, but changing didn't
seem to help.
Error Message
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
This occurs at the AddNew line in the following code:
<% @Language = VBScript %>
<% Option Explicit %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<!-- This is basically a data processing document that
when finished stores responses to a data base table
hradmin -->
<!--METADATA TYPE="typelib"
FILE="C:\Program Files\Common
Files\System\ado\msado15.dll"-->
<html>
<head>
<title>Process HR Admin</title>
</head>
<body>
<%
'Need to figure out why this recordset is read-only
Dim strCoID, intCoID
strCoID = Request.form("CoID")
intCoID = CInt(strCoID)
Response.Write intCoID
Dim objConnect
Set objConnect = Server.CreateObject("ADODB.Connection")
Dim strConnect
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\wwwroot\SRRMkt\Mkt.mdb;Persist Security
Info=False"
Dim objRS
Set objRS = Server.CreateObject ("ADODB.Recordset")
objRS.Open "HR1", strConnect, adOpenKeyset,
adLockOptimistic, adCmdTable
'objRS.MoveLast
objRS.AddNew
'objRS("CoID") = intCoID
objRS.Update
objRS.Close
Set objRS = Nothing
objConnect.Close
Set objConnect = Nothing
%>
</body>
</html>