Two ways:
(1) Using ADODB.Command and ADODB.Paremeter objects, which create by calling commandObject.CreateParameter and then add to the command using commandObject.Append
You can check out examples and docs here:
http://msdn.microsoft.com/en-us/library/ms677209(VS.85).aspx
(That's a jump into the middle of the stuff, but perhaps the first thing to see.)
(2) The quick and dirty way.
Code:
CREATE PROC foo
@param1 INT,
@param2 VARCHAR(30)
AS
...
And then invoke it via:
Code:
<%
SQL = "CALL foo( 17, 'zamboni' )"
Set RS = yourConnectionObject.Execute( SQL )
%>
************
CAUTION: That second way is STILL subject to SQL injection! You *NEED* to sanitize all parameters.
So of course the right thing to do is method 1, even if it is a pain.