To improve the efficiency of ASP programs, it is sometimes necessary to use SQL Server storage technology in ASP, which is briefly described below.
Establishment of stored procedures
Here is a brief description of how to establish a stored procedure in SQL Server Enterprise Manager:
(1) Open Enterprise Manager Enterprise Manager
(2) Select the server groups (SQL Server group), servers, databases (database), and the database of the Stored, right-click the corresponding database under the Procdures item, in the pop-up menu select New Stored Procedure, In Stored Procedures properties, enter the statement that establishes the stored procedure. Here is an example:
CREATE PROCEDURE proctest @mycola char (@mycolb char), @mycolc text as
Insert into Chatdata (MYCOLA,MYCOLB,MYCOLC) VALUES (@mycola, @mycolb, @mycolc)
If you are unfamiliar with SQL syntax, you can use check syntax to check the syntax. In the example above, represents a stored procedure named Mycola with 3 parameters, where the first parameter mycola the data type is char, Width 10, the 2nd parameter data type is char, the width is 10, and the 3rd parameter data type is text, where SQL is used The data type of the server.
After a stored procedure is established, the following is how to invoke the stored procedure in an ASP program: Invoking a stored procedure in ASP to improve the efficiency of an ASP program, sometimes using the storage technology using SQL Server in ASP, the following is simply a statement p with the add parameter above. Append cm. CreateParameter ("@mycolc", 201,1,250) in the format:
P.append cm. CreateParameter ("Parameter name", type, direction, size)
The meaning of the type of the parameter value is as follows:
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.