I have the following classic asp working, calling a stored proc in the database. I would like to convert it over so instead of calling the stored proc it passes in the sql,
To switch from a stored procedure to inline SQL, you need to change
cmd.CommandType = adCmdStoredProc
to
cmd.CommandType = adCmdText
Then you need to add the query to the command text property:
cmd.CommandText = "SELECT * FROM Orders WHERE CustomerID = ?"
The above line was derived from the Command Object Parameters example on MSDN.