Storage procedure uses Daquan

xiaoxiao2021-03-06  100

Storage procedure uses Daquan

Date: 2003-1-7 10:07:42 Source: unified teaching network Author: - 1, call a stored procedure with no parameters <% set conn = server.CreateObject ( "adodb.connection") set cmd = server.CreateObject ( "adoDb.command") strconn = "DSN = PUBS; UID = SA; PWD" Conn.open strconnset cmd.activeConnection = conncmd.commandtext = "{call nono}" 'set = cmc.exe or cmd.executeset = cmd.execute ()%> 2, a stored procedure of an input <% set conn = server.createObject ("adoDb.connection") set cmd = server.createObject ("adoDb.command") strconn = "DSN = Pubs ; uid = sa; pwd "conn.Open strconnset cmd.ActiveConnection = conncmd.CommandText =" {(?) call oneinput} "cmd.Parameters.Append cmd.CreateParameter (" @ aaa ", adInteger, adParamInput) cmd (" @ AAA ") = 100cmd.execute ()%> 3, an input parameter and an output parameter <% set conn = server.createObject (" adodb.connection ") SET cmd = server.createObject (" adodb.command ") Strconn = "DSN = PUBS; UID = SA; PWD" conn.open strconnset cmd.activeconnection = conncmd.commandtext = "{call oneinout (?,?)}" cmd.parameters.Append cmd.createParameter ("@ aaa", Adinteger Adparaminput) CMD ("@ aaa") = 10cmd.Parameters.Append cmd.createParameter ("@ bbb", Adinteger, Adparamoutp UT) cmd.execute () bbb = cmd ("@ bbb")%> 4, an input parameter, an output parameter, and a return value <% set conn = server.createObject ("adoDb.connection" SET CMD = Server.createObject ("AdoDb.command") strconn = "DSN = PUBS; UID = SA; PWD" Conn.An.AnTrConnset cmd.activeconnection = conncmd.commandtext = "{? = CLL ANDRN (?,?)}" cmd. Parameters.Append cmd.createparameter ("@

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

New Post(0)