asp调用orcle存储过程
建立表:
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 ;
建立过程:
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;
调用过程:
<%@ LANGUAGE="Javascript"%>
<%
var conn = Server.CreateObject("ADODB.Connection");
conn.Open("sczbo","sczb","sczb");
var sp_common= Server.CreateObject("ADODB.Command");
var rs = 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,"联通");
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;
%>
版权声明:
作者:Kiyo
链接:https://www.wkiyo.cn/html/2008-01/i437.html
来源:Kiyo's space
文章版权归作者所有,未经允许请勿转载。
共有 0 条评论