check out this tutorial: http://www.aspnet101.com/aspnet101/tutorials.aspx?id=2 (How to Use Variables, Single & Double Quotes in SQL Statements) and this one, after that : http://www.aspnet101.com/aspnet101/tutorials.aspx?id=1
After learning this stuff, if made my life a whole lot easier. sean12302000 <[EMAIL PROTECTED]> wrote: hi jarrad, do you have any code snippets that you could give me ? Sean --- In [EMAIL PROTECTED], "jmplun" <[EMAIL PROTECTED]> wrote: > 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 SponsorADVERTISEMENT --------------------------------- 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 the Yahoo! Terms of Service. --------------------------------- Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/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/
