I'm racking my brain on this (still new to ASP) -- simplified as much as I can....I am trying to update a record on an access database. My SQL is good, it errors on the line "objConn.Execute strSQL" saying 'Operation must use an updateable query.' -- which leads me to believe it is a problem on my recordset parameters....but I don't see it.
Any ideas appreciated...
"movieReview" is a table in the billTest.mdb database
The movieReview table contains fields including ID and Movie
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!-- #include virtual="/vetroDS/includes/adovbs.inc"-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("billTest.mdb"
objConn.Open
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset"
objRS.Open "movieReview",objConn,adOpenKeyset,adLockBatchOptimistic
strSQL="UPDATE movieReview SET Movie='XXX' WHERE ID=15"
objConn.Execute strSQL
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
</body>
</html>
Any ideas appreciated...
"movieReview" is a table in the billTest.mdb database
The movieReview table contains fields including ID and Movie
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!-- #include virtual="/vetroDS/includes/adovbs.inc"-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("billTest.mdb"
objConn.Open
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset"
objRS.Open "movieReview",objConn,adOpenKeyset,adLockBatchOptimistic
strSQL="UPDATE movieReview SET Movie='XXX' WHERE ID=15"
objConn.Execute strSQL
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
</body>
</html>