ASP debug stored procedure

zhaozj2021-02-16  50

ASP development BS architecture three-layer system, which is a good implementation of the business logic in the stored procedure of SQLServer, but there is a debugging between ASP client and database stored procedures. inconvenient.

In actual development, I wrote the following function, automatically pass the ASP terminal to the parameters of the database, automatically generate the stored procedures that meet the rules of the SQLServer query analyzer, put them in the TextArea control, can copy directly from the page to the query The stored procedure commissioning is made in the analyzer. The following is the program. '===================================== =============================== DSN 'Data Source Dim Storename' stored procedure name DIM Con 'Connection Object DIM CMD' Command Object dim rs' Recordset objects set con = server.createobject ( "ADODB.Connection") con.open dsnset cmd = server.createobject ( "ADODB.Command") set cmd.ActiveConnection = Concmd.CommandText = storename cmd.Commandtype = adCmdStoredProccmd .Parameters.Append cmd.CreateParameter ( "@ State", adInteger, adParamInput, 4) cmd.Parameters.Append cmd.CreateParameter ( "@ WhereT", adVarChar, adParamInput, 200) cmd.Parameters.Append cmd.CreateParameter ( "@ BranchType ", Advarchar, Adparaminput, 50) CMD (" @ State ") = 1 cmd (" @ WHERET ") =" 2 "cmd (" @ BranchType ") =" 3 "getpmt (cmd) 'Getting parameters for stored procedures SET RS = Server.createObject ("AdoDb.Recordset") rs.cursortype = 3 rs.lockType = 3 rs.cursorLocation = 3 set rs.Source = cmd ropen '============ =====================================================1 "Let's form a function of forming a stored procedure The number '====================================================================================================================================================================

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

New Post(0)