度量快速开发平台,可以直接调用数据库中做好的存储过程,并能得到存储过程返回的值。参看调用存储过程的代码:
-
dim sp=CreateProcedure("default","DELIT_PRO_CALL")
-
'AddInputParam("参数名称",参数枚举,参数值) 添加存储过程输入参数
-
'参数枚举:数字(13),日期(6),字符(22)
-
sp.AddInputParam("num_in",13,20084)
-
sp.AddInputParam("date_in",6,now())
-
sp.AddInputParam("var_in",22,"张三")
-
'AddOutputParam("参数名称",参数枚举,内容长度) 添加存储过程输出参数
-
'参数枚举:数字(13),日期(6),字符(22),游标(5)
-
sp.AddOutputParam("num_out",13,0)
-
sp.AddOutputParam("date_out",6,8)
-
sp.AddOutputParam("var_out",22,400)
-
'Execute 执行存储过程,传入参数指示是否提交事务(True表示提交事务,)
-
sp.Execute(false)
-
'GetOutPraramValue 获取存储过程输出参数的值
-
dim out1=sp.GetOutPraramValue("num_out")
-
dim out2=sp.GetOutPraramValue("date_out")
-
dimout3= sp.GetOutPraramValue("var_out")
原文地址:http://plat.delit.cn/thread-147-1-1.html
转载请注明出处:
撰写人:度量科技http://www.delit.cn
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/328153/viewspace-1814987/
,如需转载,请注明出处,否则将追究法律责任。