I have the following ASP code in my Add Data page. (This is me getting my feet wet with Access & ASP.) I can access the data and view it fine, but when I execute this page, I get the error that follows the code.
--------------------Code--------------------------------
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Untitled Document</title>
</head>
<body>
<%
Dim DBtest
Set DBtest = Server.CreateObject("ADODB.Connection"
DBtest.Mode = adModeReadWrite
DBtest.Open ("Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("addresses.mdb"
)
Dim RStest
Set RStest = Server.CreateObject("ADODB.Recordset"
RStest.CursorType = adUseClient
RStest.Open "Addresses", DBtest, adOpenStatic, adLockOptimistic
RStest.AddNew
RStest ("FirstName"
= "TestFirstName"
RStest ("LastName"
= "TestLastName"
RStest.Update
%>
<p>Success!! </p>
</body>
</html>
-------------------ERROR-------------------------------
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/chemteach/dbtest/add2.asp, line 20
--------------------Code--------------------------------
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Untitled Document</title>
</head>
<body>
<%
Dim DBtest
Set DBtest = Server.CreateObject("ADODB.Connection"
DBtest.Mode = adModeReadWrite
DBtest.Open ("Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("addresses.mdb"
Dim RStest
Set RStest = Server.CreateObject("ADODB.Recordset"
RStest.CursorType = adUseClient
RStest.Open "Addresses", DBtest, adOpenStatic, adLockOptimistic
RStest.AddNew
RStest ("FirstName"
RStest ("LastName"
RStest.Update
%>
<p>Success!! </p>
</body>
</html>
-------------------ERROR-------------------------------
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/chemteach/dbtest/add2.asp, line 20