Well for one you haven't closed the quote after the order by statement and two.. Don't use embedded criteria. Use parameters instead as they are a security risk.
Jarrad -----Original Message----- From: sean12302000 [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 10:58 AM To: [EMAIL PROTECTED] Subject: [AspNetAnyQuestionIsOk] using an order by clause in my SQL statement? Hi, I am using a SQL statement to return results into my dataset, how can I use an order by clause? I have tried but the script keeps crashing. could someone help me out with some code please? Sean - thanks in advance Dim objSQLAdapter As New SQLDataAdapter("SELECT L.manufacturer, L.model, L.listprice, L.username, L.listingID,L.listeddate,G.Location FROM tblListings L INNER JOIN tbLocation G ON L.location = G.LocationID WHERE L.Location=" & CategoryID & " ORDER BY L.listeddate, strConnect) Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
