Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
| Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP 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
  #1 (permalink)  
Old February 1st, 2005, 07:11 AM
Registered User
 
Join Date: Feb 2005
Location: Cork, , Ireland.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Syntax Error in the update statement

Hi I have been getting an error for the past few days in my UPDATE statement and I can't see where Im going wrong...any help would be great thanks...

MySql="Update Calendar Set booked = true, UID= " & Session("id") & ", treatment ='" & request.form("treatment") & "', Comments='" & request.form("comments") & "' Where id=" & id
my_conn.execute(MySql)

  #2 (permalink)  
Old February 1st, 2005, 12:48 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

What error do you get exactly?

To help diagnosing the problem, try this:

MySql="Update Calendar Set booked = true, UID= " & Session("id") & ", treatment ='" & request.form("treatment") & "', Comments='" & request.form("comments") & "' Where id=" & id
Response.Write(MySql)
Response.End
my_conn.execute(MySql)

That outputs your SQL statement to the browser. Then copy and paste the statement in the query designer of your database, to see where it breaks.

If that doesn't help, can you post the outcome of the Response.Write statement?

Cheers,

Imar


Similar Threads
Thread Thread Starter Forum Replies Last Post
NEED HELP INSERT INTO statement syntax error koco ASP.NET 1.0 and 1.1 Basics 6 June 2nd, 2006 04:01 PM
Syntax error on SQL statement Chris1 Access VBA 1 September 7th, 2004 07:47 AM
Syntax error in INSERT INTO statement remnatch Access ASP 9 July 8th, 2004 12:09 PM
UPDATE statement returns syntax error AviatorTim Classic ASP Databases 2 January 8th, 2004 05:22 PM





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