关于asp调用oracle存储过程的问题oracle存储过程如下create or replace procedure PROC_GIFT_TEST(v_charge out varchar2)
isbegin
select mame into v_charge from gift_type where gift_id=1001 ;
end PROC_GIFT_TEST;在PL/SQL中测试返回:sql>variable aaa varchar2(100);
sql>exec proc_gift_test(:aaa);PL/SQL procedure successfully completed
aaa
---------
奖励sql>print aaa;aaa
---------
奖励
asp中调用脚本(adovbs.inc已包含在asp中)
〈%
Dim aaa
set theconn=server.createobject("adodb.connection")
connstr="Provider=OraOLEDB.Oracle;data source=ora;user id=gift;password=gift;"
theconn.open connstr set cmd=server.createobject("adodb.command")
cmd.activeconnection=theconn
CMD.CommandType=4
cmd.commandtext="PROC_GIFT_TEST"
cmd.parameters.append cmd.createparameter(v_charge,adVarChar,AdParamOutput,100)
cmd.execute ,,adExecuteNoRecords
aaa=cmd.parameters(v_charge)
CMD.ActiveConnection=Nothing
set cmd=nothing
theconn.close
%〉现在我的目的是通过asp将proc_gift_test过程的输出参数送到变量aaa中(得到aaa=奖励),在调试aaa=cmd.parameters(v_charge)时,老是出错,提示:Microsoft VBScript 编译器错误 错误 '800a03f6' 缺少 'End' /iisHelp/common/500-100.asp,行242 ADODB.Command 错误 '800a0cc1' 项目在所需的名称或序数中未被发现。 /out.asp,行30
请教高手,我该如何操作该过程的输出参数应用到asp中来,急求赐教。谢谢!!!
isbegin
select mame into v_charge from gift_type where gift_id=1001 ;
end PROC_GIFT_TEST;在PL/SQL中测试返回:sql>variable aaa varchar2(100);
sql>exec proc_gift_test(:aaa);PL/SQL procedure successfully completed
aaa
---------
奖励sql>print aaa;aaa
---------
奖励
asp中调用脚本(adovbs.inc已包含在asp中)
〈%
Dim aaa
set theconn=server.createobject("adodb.connection")
connstr="Provider=OraOLEDB.Oracle;data source=ora;user id=gift;password=gift;"
theconn.open connstr set cmd=server.createobject("adodb.command")
cmd.activeconnection=theconn
CMD.CommandType=4
cmd.commandtext="PROC_GIFT_TEST"
cmd.parameters.append cmd.createparameter(v_charge,adVarChar,AdParamOutput,100)
cmd.execute ,,adExecuteNoRecords
aaa=cmd.parameters(v_charge)
CMD.ActiveConnection=Nothing
set cmd=nothing
theconn.close
%〉现在我的目的是通过asp将proc_gift_test过程的输出参数送到变量aaa中(得到aaa=奖励),在调试aaa=cmd.parameters(v_charge)时,老是出错,提示:Microsoft VBScript 编译器错误 错误 '800a03f6' 缺少 'End' /iisHelp/common/500-100.asp,行242 ADODB.Command 错误 '800a0cc1' 项目在所需的名称或序数中未被发现。 /out.asp,行30
请教高手,我该如何操作该过程的输出参数应用到asp中来,急求赐教。谢谢!!!
ASP脚本如何调用Oracle存储过程