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 April 28th, 2004, 01:49 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Message Help??

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.

Here is my update code that is getting the error

IF Request.Form("submit")="Save Changes" THEN
        SQLStr="SELECT * FROM ORNextIssue WHERE NextIssueID=" & Request.Form("ID")
        RS.Open SQLStr,Application("DBConn"),1 ,2 ,&H0001
        RS("NextIssueID")=Request.Form("ID")
        RS("Title")=Request.Form("Title")
        RS("Line1")=Request.Form("Line1")
        RS("Line2")=Request.Form("Line2")
        RS("Line3")=Request.Form("Line3")
        RS("Line4")=Request.Form("Line4")
        RS("Line5")=Request.Form("Line5")
        RS("Line6")=Request.Form("Line6")
        RS("Line7")=Request.Form("Line7")
        RS("Line8")=Request.Form("Line8")
        RS("Line9")=Request.Form("Line9")
        RS("Line10")=Request.Form("Line10")
        RS("AdDate")=Request.Form("AdDate")

        RS.Update
END IF

I used this code a dozen times and this is the only one I have a problem with.

I don't see what's wrong with it


__________________
-----------------------------------------------------------
\"Don\'t follow someone who\'s not going anywhere\" John Mason
 
Old April 28th, 2004, 10:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try printing the Request.Form("ID")

I suspect it to be empty or no value coming with it. This error is because, you are trying to run an incomplete query .

To test that out, execute this alone at you database and see what error you get?
SELECT * FROM ORNextIssue WHERE NextIssueID=

So it is simeple that your ID doesnt come up to this page.

Cheers!

-Vijay G





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the error message for a 500 server error? chobo2 C# 2005 1 May 4th, 2008 03:11 AM
Where does the error message go? Wei Wang BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 13th, 2006 02:03 PM
Error Message alannoble26 Excel VBA 4 November 25th, 2005 11:20 AM
error message. Tasha Access VBA 2 August 11th, 2004 11:07 PM
Help with Error message mariakovacs Classic ASP Databases 3 October 10th, 2003 03:59 PM





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