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 October 9th, 2003, 03:13 PM
Authorized User
 
Join Date: Sep 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with Error message

I am reusing a code that has been already working fine in another part of our website.
I am getting the following error message:

Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'CustomerID ='.
/test/ins_VIPPuserlinks.asp, line 183

This is the statement where the problem is:
        user_id = session("user_id")
    CustomerID = request("CustomerID")
    set rs = cn.Execute("SELECT Supplier, Web_Address FROM VIPP WHERE CustomerID = " & CustomerID)
    if not rs.EOF then
        Supplier = rs("Supplier")
        VIPP_URL = rs("Web_Address")

NOTE: Customer ID is an AutoNumber in my VIPP table and Number in my User_Links table.

Code from Links page to add link to favorits:
<% if session("user_id") <> "" then %>[<A href='ins_VIPPuserlinks.asp?CustomerID=<% =CustomerID %>' class='labelTD'>add to favorites</A>]<% end if %>

I can't figure out where I am missing the missing operator...please HELP!
 
Old October 9th, 2003, 03:22 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

It looks like the customerID isn't making it into the query. You'll have to troubleshoot whether CustomerID = request("CustomerID") is working right, and work your way back to see where the customerID is getting dropped.

Peter
 
Old October 10th, 2003, 03:37 PM
Authorized User
 
Join Date: Sep 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As you suggested I tried to trace back where the CustomerID gets dropped, but by now I am more lost than I was when I started looking for it. I uploaded the whole file into a textfile here:
http://cliq-on.com/test/vipp.txt

Can someone please point out mistakes for me?
Thanks
 
Old October 10th, 2003, 03:59 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I took a look at that code, and I can't see what the problem is. Everything looks ok. Without being to actually witness the code running it's hard to say.

Can you take a look at the HTML of the page before you post it and get the error? Confirm that your hidden CustomerID field is getting populated correctly and that the action field is set right. Otherwise, there's little I can get out of looking at the code. Maybe you are getting returned bad data.

Peter





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
ERROR MESSAGE underbuchha Visual C++ 2005 0 September 30th, 2006 02:50 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





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