[thelist] parameters in classic asp

Ken Schaefer Ken at adOpenStatic.com
Fri Nov 11 21:24:59 CST 2005


IIRC:

strSQL = "SELECT UserID FROM Users WHERE UserName = @UserName AND
UserPassword= @UserPassword"

With objCommand
	Set .ActiveConnection = objConn
	.CommandText = strSQL
	.Parameters.Append .CreateParameter("@UserName", adVarChar, 50)
	.Parameters.Append .CreateParameter("@UserPassword", adVarChar, 50)
End With

Set objRS = objCommand.Execute

Best off looking the ADO reference on MSDN for the exact syntax/parameter
list for each method above.

Cheers
ken



: -----Original Message-----
: From: thelist-bounces at lists.evolt.org [mailto:thelist-
: bounces at lists.evolt.org] On Behalf Of Casey
: Sent: Saturday, 12 November 2005 10:20 AM
: To: thelist at lists.evolt.org
: Subject: Re: [thelist] parameters in classic asp
: 
: 
: > So, I need to swap out "SELECT * FROM users WHERE userid = '" & user_id
: &
: > "'
: > AND password = '" & password & "'"
: >
: > with parameters: "SELECT * FROM users WHERE userid = @userid AND
: password
: > =
: > @password"
: 
: 
: We're using ODBC if that makes a difference.




More information about the thelist mailing list