Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SQL Error -800A0401

    Hello to everyone who read this thread,

    I'm having an error in SQL part. I'm using ASP 2003 and SQL Server 7.0. This is my error.

    Error Type:
    Microsoft VBScript compilation (0x800A0401)
    Expected end of statement
    /Crystal_1/productlist.asp, line 19, column 23
    "ORDER BY product_name",
    ------------------------^

    And This is my coding,

    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.Open "Driver={SQL Server};" &_
    "Server=Aurora;" &_
    "Database=CRYSTAL;" &_
    "Uid=sa;" &_
    "Pwd=;"

    Set conn= Server.CreateObject("ADODB.Recordset")

    conn="SELECT product_id,product_picture,product_name,product_briefDesc " &_
    "FROM Product WHERE product_category= '" &cat& "' " &_
    "AND status=1" &_
    "ORDER BY product_name",

    Anyone please kindly reply the solution for this error. Thank a lot. God Bless You.

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    "ORDER BY product_name"

    (take the comma off the end of the line)


  •  

    Posting Permissions

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