Problem with OracleTable Parameter
Posted: Wed 28 Dec 2005 09:46
I execute some PL/SQL code with one OUT Parameter of type
OracleTable.
This is how I add the parameter to the OracleCommand:
##################################
opRESULT = new OracleParameter();
opRESULT.ParameterName = ":RESULT";
opRESULT.DbType = resultType;
if( opRESULT.DbType == DbType.Object )
opRESULT.ObjectTypeName = ResultTypeName;
if( isReturnValueOracleCollection )
opRESULT.OracleDbType = CoreLab.Oracle.OracleDbType.Table;
opRESULT.Direction = ParameterDirection.Output;
command.Parameters.Add( opRESULT );
#################################
After calling ExecuteNonQuery() the parameter shows the right number of elements for the table/collection.
When trying to access the elements of the table (either using foreach(...) or using the indexer) I get the following error:
CoreLab.Oracle.OracleException: OCI-22881: Message 22881 not found; product=RDBMS; facility=OCI
at a.a.ad.b(Int32 A_0)
at CoreLab.Oracle.OracleArray.d(Int32 A_0)
at CoreLab.Oracle.OracleTable.b(Int32 A_0)
at CoreLab.Oracle.OracleArray.a(Int32 A_0)
at CoreLab.Oracle.OracleArray.get_Item(Int32 i)
at SLS.FrameWork.MiddleTier.OracleObjectBase.invokeStaticDBMethod(Transaction transaction, String className, String methodName, DbType resultType, String ResultTypeName, Boolean hasReturn, Boolean isReturnValueOracleCollection, DBMethodParameter[] parameters).
OraDirect.Net Version is 3.00.00
Any idea?
Regards,
Thomas
OracleTable.
This is how I add the parameter to the OracleCommand:
##################################
opRESULT = new OracleParameter();
opRESULT.ParameterName = ":RESULT";
opRESULT.DbType = resultType;
if( opRESULT.DbType == DbType.Object )
opRESULT.ObjectTypeName = ResultTypeName;
if( isReturnValueOracleCollection )
opRESULT.OracleDbType = CoreLab.Oracle.OracleDbType.Table;
opRESULT.Direction = ParameterDirection.Output;
command.Parameters.Add( opRESULT );
#################################
After calling ExecuteNonQuery() the parameter shows the right number of elements for the table/collection.
When trying to access the elements of the table (either using foreach(...) or using the indexer) I get the following error:
CoreLab.Oracle.OracleException: OCI-22881: Message 22881 not found; product=RDBMS; facility=OCI
at a.a.ad.b(Int32 A_0)
at CoreLab.Oracle.OracleArray.d(Int32 A_0)
at CoreLab.Oracle.OracleTable.b(Int32 A_0)
at CoreLab.Oracle.OracleArray.a(Int32 A_0)
at CoreLab.Oracle.OracleArray.get_Item(Int32 i)
at SLS.FrameWork.MiddleTier.OracleObjectBase.invokeStaticDBMethod(Transaction transaction, String className, String methodName, DbType resultType, String ResultTypeName, Boolean hasReturn, Boolean isReturnValueOracleCollection, DBMethodParameter[] parameters).
OraDirect.Net Version is 3.00.00
Any idea?
Regards,
Thomas