View Full Version : SQL Error -800A0401

12-08-2007, 08:47 PM
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;" &_

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.

12-10-2007, 10:03 AM
"ORDER BY product_name"

(take the comma off the end of the line)