Novice needs help - connection.execute fails
I'm not quite sure why I'm unable to make this work. I've got a web report that includes a button for updating the record. The button opens a new window containing a small form that then passes the record pkey value and a date. Submitting the form then calls the asp page that should execute the update. When attempt to execute the update statement I get an error in the log file:
"Operation_must_use_an_updateable_query".
Here's the asp page (ugly as it is--not a programmer ;):
<%@ language = "vbscript" %>
<% Response.Buffer=true %>
<html><head><title>Testing Stuff</title><head><body>
<%
set Cn = Server.CreateObject("ADODB.Connection")
CnString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=*****;Data Source=\\ww730infospan\siebelrpts$\\siebel.reporti ng.mdb;"
Cn.Open CnString
strUpdQry = "UPDATE nsa_tickets SET [Expected Delivery Date] = #" & Request.Form("ExpDelvDt") & "# WHERE [SR Number] = '" & Request.Form("SR_Number") & "'"
Response.Write(strUpdQry)
Cn.Execute(strUpdQry)
Cn.CLose
%>
</body></html>
I also need some help on formatting the date value. I think I need the enclosing hash marks (#).
Any ideas one why I'm unable to update a record? Do I need to create a different type of connection?
TIA
John
|