Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 9th, 2003, 03:13 PM
Authorized User
 
Join Date: Sep 2003
Location: Pittsburgh, PA, USA.
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!
Reply With Quote
  #2 (permalink)  
Old October 9th, 2003, 03:22 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
Reply With Quote
  #3 (permalink)  
Old October 10th, 2003, 03:37 PM
Authorized User
 
Join Date: Sep 2003
Location: Pittsburgh, PA, USA.
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
Reply With Quote
  #4 (permalink)  
Old October 10th, 2003, 03:59 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:25 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.