> Absolutely. Not a bit of dynamic sql in sight! :-)
> (they use parameters - no concatenation to create sql statements)
[quoted text clipped - 22 lines]
>>> I don't check it very often. If you must reply off-line, then remove
>>> the "NO SPAM"
The fact that it's passing parameter values rather than using concatentation
to build a sql statement (dynamic sql).
SQL Injection depends on the use of dynamic sql. Without dynamic sql, sql
injection cannot take place. Try it. Create a table called tblTest
containing a Text column called txtcol and add 3 records containing 'a',
'b', and 'c' in the column. Then create a saved parameter query called qTest
with this sql:
select * from tstTable where txtcol=[p]
Then in asp try running this code:
s="a union select * from tstTable"
response.write "using dynamic sql;<BR>"
set rs=Connection.Execute(select * from tsttable where txtcol='" & _
s & "'"
response.write s.getstring(,,,"<BR>")
response.write "<BR>using saved parameter query: <BR>"
set rs=createobject("adodb.recordset")
Connection.qTest par1,rs
if rs.eof then response.write "no records returned"
> So basically after assigning the parameter variables it would look
> something like this:
[quoted text clipped - 37 lines]
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

Signature
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
zz12 - 14 Sep 2007 23:21 GMT
Thanks for your insightful and quick reply Bob. Much appreciated. Have a
good weekend.
Cheers :-)
> The fact that it's passing parameter values rather than using
> concatentation to build a sql statement (dynamic sql).
[quoted text clipped - 60 lines]
>>> I don't check it very often. If you must reply off-line, then remove
>>> the "NO SPAM"