ASP calls orcle stored procedure (output parameters in the process)

xiaoxiao2021-04-02  244

Creating tables: SQL> create table CD_BILL_LOG 2 (3 BILL_ID NUMBER, 4 DEAL_EMP_ID NUMBER, 5 REACH_DATE DATE, 6 DONE_DATE DATE, 7 BILL_STATUS VARCHAR2 (10), 8 DEAL_DEPT_ID NUMBER, 9 SIGN NUMBER, 10 REMARK VARCHAR2 (50) 11) 12 ;

Establishment process:

SQL> create or replace procedure 2 cd_update_log (inputremark varchar2, msg out float) 3 as 4 begin 5 6 update cd_bill_log a 7 set a.remark = inputremark --to_char (sysdate, 'mi: ss') 8 where a.bill_id = 45; 9 msg: = 1; 10 Commit; 11 end;

Calling process:

<% @ Language = "JavaScript"%> <% var conn = server.createObject ("adoDb.connection"); conn.open ("sczbo", "sczb", "sczb"); var sp_common = server.createObject ( "AdoDb.command"); var = server.createObject ("AdoDb.Recordset"); conn.cursorlocation = 3;

SP_COMMON.COMMANDTEXT = "cd_update_log"; sp_common.commandtype = 4;

Var para1 = sp_common.createParameter ("INPUTREMARK", 129, 1, 50, "Unicom"); sp_common.parameters.Append (para1); var para2 = sp_common.createParameter ("msg", 3, 2); sp_common.parameters .Append (para2); sp_common.activeconnection = conn; sp_common.execute; var msg = sp_common ("msg"); response.write (msg); response.end;

%>

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

New Post(0)