GetDynamicRightByUserOrGroupID存储过程
使用了如下程序: -- 获取用户/用户组所有层次的所属用户组
GetAllExecutorByUserOrGroupID(ps_MemberID, v_AllExecutorCur);
-- 遍历每条记录
LOOP
-- 获取执行者ID, 执行者名称, 执行者类型
FETCH v_AllExecutorCur INTO v_ExecutorID, v_ExecutorName, v_ExecutorType;
.....
EXIT WHEN v_AllExecutorCur%NOTFOUND;
END LOOP;其中v_AllExecutorCur为定义成Sys_Base.BaseCursor类型的返回游标,GetAllExecutorByUserOrGroupID为存储过程。直接Test该存储过程,譬如输入'U132055',存储过程运行正常且返回记录集正确。使用.NET客户端连接数据库,调用存储过程,使用.NET自己数据库事务处理
// 获取数据库连接串
strConnString = ...;
// 建立数据库连接
ocn = new OracleConnection(strConnString);
ocn.Open();
// 开始事务
ot = ocn.BeginTransaction();
..... // 获取结果数据集,并提交事务
oda.Fill(dsRight,"Recordset");
ot.Commit();报如下错误: 请大家帮忙看一下什么问题!错误位置在上面的存储过程中
FETCH v_AllExecutorCur INTO v_ExecutorID, v_ExecutorName, v_ExecutorType; 处报错信息为: 错误类型为ORA-01001 无效游标
使用了如下程序: -- 获取用户/用户组所有层次的所属用户组
GetAllExecutorByUserOrGroupID(ps_MemberID, v_AllExecutorCur);
-- 遍历每条记录
LOOP
-- 获取执行者ID, 执行者名称, 执行者类型
FETCH v_AllExecutorCur INTO v_ExecutorID, v_ExecutorName, v_ExecutorType;
.....
EXIT WHEN v_AllExecutorCur%NOTFOUND;
END LOOP;其中v_AllExecutorCur为定义成Sys_Base.BaseCursor类型的返回游标,GetAllExecutorByUserOrGroupID为存储过程。直接Test该存储过程,譬如输入'U132055',存储过程运行正常且返回记录集正确。使用.NET客户端连接数据库,调用存储过程,使用.NET自己数据库事务处理
// 获取数据库连接串
strConnString = ...;
// 建立数据库连接
ocn = new OracleConnection(strConnString);
ocn.Open();
// 开始事务
ot = ocn.BeginTransaction();
..... // 获取结果数据集,并提交事务
oda.Fill(dsRight,"Recordset");
ot.Commit();报如下错误: 请大家帮忙看一下什么问题!错误位置在上面的存储过程中
FETCH v_AllExecutorCur INTO v_ExecutorID, v_ExecutorName, v_ExecutorType; 处报错信息为: 错误类型为ORA-01001 无效游标
show errors;看看有什么详细的提示没有?