How to call a stored procedure

Source: Internet
Author: User

How to call a stored procedure this is a problem for beginners ASP invokes stored procedures and SQL call stored procedures I don't think it's a beginner's problem, so let's take a look at the problem here.

Several ways for ASP to invoke a stored procedure with parameters

1 This is also the simplest method, two input parameters, no return value, for insert,update,delete operations more.


The following are the referenced contents:
Conn. Execute "ProcName varvalue1,varvalue2"


2) If you want to return the recordset set:


The following are the referenced contents:
Set rs = Server.CreateObject ("Adodb.recordset")
Rs. Open "Exec procname varvalue1, varvalue2", Conn
Webjx.com

3 The above two methods can not have return value, (except the recordset), if you want to get the return value, you need to use the command method.

First, there are two types of return values. One is to return a value directly in the stored procedure, just like the functions returned by C and VB; the other is that you can return multiple values, and the name of the variable that stores the values needs to be specified first in the invocation parameter

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.