How to call a stored procedure

Source: Internet
Author: User
How to call stored procedures is a problem for beginners. asp calls stored procedures and SQL calls stored procedures. I don't think this is a problem for beginners. Let's take a look at this problem. & Nbsp; ASP calls several methods with parameter stored procedures. 1) this is also the simplest method. Two input parameters have no return value, there are many Insert, Update, and Delete operations. Reference content: & nbsp; & nb How to call a stored procedureThis is a problem for beginners. asp calls the stored procedure and SQL call Stored ProcedureI don't think this is a problem for beginners. Let's take a look at this problem.

Several Methods for ASP to call stored procedures with Parameters

1) this is also the simplest method. Two input parameters have no return values and are used for Insert, Update, and Delete operations.


Reference content is as follows:
Conn. Execute "procname varvalue1, varvalue2"


2) If you want to return the Recordset:


Reference content is as follows:
Set rs = server. createobject ("adodb. recordset ")
Rs. Open "Exec procname varvalue1, varvalue2", conn
Webjx. Com

3) Neither of the preceding methods can return values (except for Recordset). To obtain the return value, use the Command method.

First, there are two return values. One is to directly return a value in the stored procedure, just like the return values of C and VB functions; the other is to return multiple values, the variable name that stores these values must be specified in the call parameters first.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.