If you're calling a stored procedure (or query for the Access folks), you don't always have to create a Command object to do it. Instead, you can pass your parameters as part of the command you're executing. Here's an example, which calls the fictional GetRecord stored procedure of a particular database:
Dim dcnDB ' As ADODB.Connection
Dim rsData ' As ADODB.Recordset
Set dcnDB = Server.CreateObject("ADODB.Connection")
dcnDB.Open "some connection string"
Set rsData = dcnDB.Execute("GetRecord 123")
This code calls the GetRecord stored procedure and passes it the argument '123'. You can also use a variable concatenated to your Execute line, as shown here:
Set rsData = dcnDB.Execute("GetRecord " & lngRecordID)
Any text arguments should be surrounded by single quote characters, as shown here:
Set rsData = dcnDB.Execute("GetRecord 'Joe Smith'")