Bad syntax please help

Results 1 to 6 of 6

Thread: Bad syntax please help

  1. #1
    Marie Guest

    Default Bad syntax please help

    custid is from a SQL Server DB column & obviously userid is my session variable. The error is:<BR><BR><BR>Expected end of statement <BR><BR>/checkout.asp, line 42 <BR><BR>Cm.CommandText = "SELECT * FROM Customers WHERE custid = session("userid")"<BR><BR><BR>This is my code:<BR>Cm.CommandText = "SELECT * FROM Customers WHERE &#039custid&#039 = session("userid")"<BR>

  2. #2
    Steve Cimino Guest

    Default VERY Bad Syntax--Not Advanced!

    This is not advanced in the least.... you have 3 errors that I can spot off the top. Don&#039t mean to be mean, but this is an advanced forum. Please post in the appropriate forum!

  3. #3
    Marie Guest

    Default RE: VERY Bad Syntax--Not Advanced!

    Sorry Chief

  4. #4
    Steve Cimino Guest

    Default There is a reason for this

    I don&#039t mean to be a jerk about it, but this happens all the time. If you post in the other forum, I would&#039ve gladly pointed out your mistakes (although now with your flip remark...).<BR><BR>There are two kinds forums on ASP: Advanced and Regular. If someone is browsing in this area, it&#039s because they don&#039t want to have to deal with simplistic errors. If they&#039re in the regular forums, they don&#039t mind dealing with them. I switch back and forth, and adjust appropriately.<BR><BR>People in here get to a point where they get sick of it, and then take it all out on some poor soul who had no idea what they were doing was wrong. You just happened to be that person today.

  5. #5
    Join Date
    Dec 1969
    Los Angeles, CA

    Default and the story goes on and on and on...

    You go steve

  6. #6
    Join Date
    Dec 1969

    Default RE: Bad syntax please help

    Try this<BR><BR>Cm.CommandText = "SELECT * FROM Customers WHERE custid = &#039" & session("userid") & "&#039"<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts