如果是VB.Net + Oracle的程序,那么问题不在于“包中引用函数和视图的问题“,而是
包中程序的参数是“rst out output_cur” ,即游标变量。 可以用下面方法判别:
sql> declare
type output_cur is ref cursor;
c1 output_cur;
begin
pkg_doc.sp_qry_sheet('1001',c1);
end;
如果过程能正常结束,说明包没有问题,而是前、后的接口问题。否则,包有问题
包中程序的参数是“rst out output_cur” ,即游标变量。 可以用下面方法判别:
sql> declare
type output_cur is ref cursor;
c1 output_cur;
begin
pkg_doc.sp_qry_sheet('1001',c1);
end;
如果过程能正常结束,说明包没有问题,而是前、后的接口问题。否则,包有问题
me.fn_get_cust_name(sheet.customer_id) customer_name
改为:
sheet.customer_id customer_name
则程序能正常执行,只不过这是查询的是客户代码,而不是客户名称。
cmdstr = "{call pkg_doc.sp_qry_sales_sheet(?,resultset 0,rst})}" --〉 改为
cmdstr = "{call pkg_doc.sp_qry_sales_sheet(?)}
http://search.csdn.net/expert/topic/61/6101/2002/7/26/903782.htm
改用oracleclient接口后,就没有问题了
在使用oracle数据库的时候,尽量使用oracle专用接口