Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To use a recordset in ASP to execute a stored procedure, you can use the following steps:

  1. Create an ADODB.Connection and open it using the connection string.
  2. Set the CommandTimeout property of the connection object to the desired timeout value.
  3. Create an ADODB.Command object and set its properties.
  4. Set the ActiveConnection property of the command object to the connection object.
  5. Set the CommandText property of the command object to the name of the stored procedure.
  6. Set the CommandType property of the command object to adCmdStoredProc.
  7. Add any required parameters to the command object using the Parameters collection.
  8. Create an ADODB.Recordset object.
  9. Use the Open method of the recordset object and pass the command object as a parameter.
  10. Use the recordset object to retrieve the results of the stored procedure.