Sean,
I tend to use the microsoft data access application block myself
To use a parameter in the sql statement
Dim sqlCMD as new sqlCommand
sqlCMD.commandtext = "SELECT * from tbl where ID = @ID"
Sqlcmd.parameters.add(new sqlparameter("@ID",adparaminput,sqldbtype.int)
Sqlcmd.parameters("@ID").value = whatever value
Note that I didn't test this code. There should be heaps of examples on
the web that can give you what you need.
Jarrad
-----Original Message-----
From: sean12302000 [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 06, 2004 12:15 PM
To: [EMAIL PROTECTED]
Subject: [AspNetAnyQuestionIsOk] Re: using an order by clause in my SQL
statement?
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 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/