Use stored procedure numerical types in ASP

xiaoxiao2021-03-06  101

Using the stored procedure in the ASP In order to improve the efficiency of the ASP program, sometimes you need to use the storage technology of SQL Server in the ASP, which is simply described below. The establishment of the stored procedure This briefly describes how to create a stored procedure in the Enterprise Manager of SQL Server: (1) Open Enterprise Manager Enterprise Manager (2) Select Server Group (SQL Server Group), Server, Database (Database) and The database, the mouse right-click the Stored Procdurate item in the corresponding database, select New Stored Procedure in the pop-up menu, and enter the statement to establish the stored procedure in Stored Procedures Properties. Here is an example: CREATE PROCEDURE proctest @mycola Char (10), @ mycolb Char (10), @ mycolc text AS Insert into chatdata (mycola, mycolb, mycolc) values ​​(@ mycola, @ mycolb, @ mycolc) in Sql Server In the document, its syntax is: create proc [edure] procedure_name [; number] [{@Parameter Data_Type} [varying] [= default] [output]] [, ... n] [with {recompile | Encryption | Recompile , Encryption}] [for replication] as sql_statement [... n] If you are not familiar with SQL syntax, you can use Check Syntax to check the syntax. In the above example, it means that the stored procedure is called Mycola, with 3 parameters of storage, where the first parameter mycola data type is CHAR, width 10; the second parameter data type is char, the width is 10, The 3 parameter data types are text, which is used here is the data type of SQL Server.

转载请注明原文地址:https://www.9cbs.com/read-97054.html

New Post(0)