Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 26th, 2003, 09:54 AM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old June 26th, 2003, 10:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

http://p2p.wrox.com/topic.asp?TOPIC_ID=136
 
Old June 26th, 2003, 10:36 AM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That was it. Thanks.





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is AJAX novice looking for? daxianjin Ajax 0 January 13th, 2008 10:13 PM
ADODB connection fails (better topic) halfnote5 Access 6 September 5th, 2007 09:35 PM
Novice User - Please Help, no-one else to ask! KarenWilliams Dreamweaver (all versions) 2 October 25th, 2005 05:29 AM
connection.execute and command.execute difference vinod_yadav1919 Classic ASP Databases 0 September 28th, 2005 06:34 AM
conn.execute,command.execute or rs.open vinod_yadav1919 Crystal Reports 0 January 3rd, 2005 10:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.