因为调用该存储过程返回的不只一个游标,所以当出现该问题时我以为应该是多游标的问题,所以获取的READER应该是要NEXTRESULT一下才能到我需要的那个。
改用了下一下方法
OracleConnection connection = new OracleConnection(connectionString); |
OracleCommand command = new OracleCommand(); |
command.Connection = connection; |
command.CommandText = "PACK_SIIT.getFlowTrack";--存储过程名 |
command.CommandType = CommandType.StoredProcedure;--设置执行为存储过程 |
command.Parameters.Add("var_barcode", OracleType.VarChar, 50); |
command.Parameters.Add("cur_FirstTrial", OracleType.Cursor).Direction = ParameterDirection.Output; |
command.Parameters.Add("cur_Scan", OracleType.Cursor).Direction = ParameterDirection.Output; |
command.Parameters.Add("cur_Send", OracleType.Cursor).Direction = ParameterDirection.Output; |
command.Parameters.Add("cur_Receive", OracleType.Cursor).Direction = ParameterDirection.Output; |
command.Parameters.Add("cur_Review", OracleType.Cursor).Direction = ParameterDirection.Output; |
command.Parameters.Add("cur_Confirm", OracleType.Cursor).Direction = ParameterDirection.Output; |
command.Parameters.Add("cur_Locked", OracleType.Cursor).Direction = ParameterDirection.Output; |
command.Parameters["var_barcode"].Value = stBarcode; |
OracleDataAdapter daReader = new OracleDataAdapter(command); |
DataSet ds = new DataSet(); |
这样去获取,后面还是持续的报那个错,找了下官网论坛,发现可能是临时表的一个设置问题
把临时表的创建选项由on commit delete rows改为on commit preserve rows
这样就OK了