G
Guest
Greetings
I am contacting you because I can't find a resolution to this on your support website but have seen references to issues that may be related
I am attempting to use the .Net Managed Provider for Oracle. Whenver I execute a stored procedure that returns null values in parameters declared as ParameterDirection.Output and OracleType.Number I receive the following error
"System.Data.OracleClient.OracleException: OCI-22060: argument [2] is an invalid or uninitialized numbe
at System.Data.OracleClient.OracleException.Check(OciHandle errorHandle, Int32 rc
at System.Data.OracleClient.OracleNumber.InternalNeg(OciHandle errorHandle, Byte[] x, Byte[] result
at System.Data.OracleClient.OracleNumber.ToDecimal(OciHandle errorHandle, Byte[] value
at System.Data.OracleClient.OracleNumber.op_Explicit(OracleNumber x
at System.Data.OracleClient.OracleNumber.get_Value(
at System.Data.OracleClient.OracleParameterBinding.GetOutputValue(NativeBuffer parameterBuffer, OracleConnection connection, Boolean needCLSType
at System.Data.OracleClient.OracleParameterBinding.PostExecute(NativeBuffer parameterBuffer, OracleConnection connection
at System.Data.OracleClient.OracleCommand.Execute(OciHandle statementHandle, CommandBehavior behavior, Boolean isReader, Boolean needRowid, OciHandle& rowidDescriptor, ArrayList& refCursorParameterOrdinals
at System.Data.OracleClient.OracleCommand.Execute(OciHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciHandle& rowidDescriptor
at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciHandle& rowidDescriptor
at System.Data.OracleClient.OracleCommand.ExecuteNonQuery(
at CityMH.Data.Oracle.Client.OraclClientHelper.ExecuteNonQuery(OracleConnection connection, CommandType commandType, String commandText, OracleParameter[] commandParameters) in C:\Local QUMA Workfiles\CityMH .Net Framework V2.0\CITYMH\Data\Oracle\Client\OracleClientHelper.vb:line 431
I tried the workaround conveyed in KB article 329163 (changed the parameter directions to InputOutput and set an initial value of 0)
While this did stop the above error from occuring, it also prevented any error from coming back from the stored procedure. I need to be able to catch the ORA-01403 that should be coming back from the stored procedure and convey the "data not found" error to the user. Therefore, this workaround cannot be used
I am using the following products
Microsoft.NET Framework 1.1 Version 1.1.432
MDAC 2.
Microsoft Visual Basic .NET 69461-270-0000007-1888
Oracle Client 8.1.7 Release
If there is a fix available, please advise
If you require any additional information, please let me know
Thanks
I am contacting you because I can't find a resolution to this on your support website but have seen references to issues that may be related
I am attempting to use the .Net Managed Provider for Oracle. Whenver I execute a stored procedure that returns null values in parameters declared as ParameterDirection.Output and OracleType.Number I receive the following error
"System.Data.OracleClient.OracleException: OCI-22060: argument [2] is an invalid or uninitialized numbe
at System.Data.OracleClient.OracleException.Check(OciHandle errorHandle, Int32 rc
at System.Data.OracleClient.OracleNumber.InternalNeg(OciHandle errorHandle, Byte[] x, Byte[] result
at System.Data.OracleClient.OracleNumber.ToDecimal(OciHandle errorHandle, Byte[] value
at System.Data.OracleClient.OracleNumber.op_Explicit(OracleNumber x
at System.Data.OracleClient.OracleNumber.get_Value(
at System.Data.OracleClient.OracleParameterBinding.GetOutputValue(NativeBuffer parameterBuffer, OracleConnection connection, Boolean needCLSType
at System.Data.OracleClient.OracleParameterBinding.PostExecute(NativeBuffer parameterBuffer, OracleConnection connection
at System.Data.OracleClient.OracleCommand.Execute(OciHandle statementHandle, CommandBehavior behavior, Boolean isReader, Boolean needRowid, OciHandle& rowidDescriptor, ArrayList& refCursorParameterOrdinals
at System.Data.OracleClient.OracleCommand.Execute(OciHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciHandle& rowidDescriptor
at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciHandle& rowidDescriptor
at System.Data.OracleClient.OracleCommand.ExecuteNonQuery(
at CityMH.Data.Oracle.Client.OraclClientHelper.ExecuteNonQuery(OracleConnection connection, CommandType commandType, String commandText, OracleParameter[] commandParameters) in C:\Local QUMA Workfiles\CityMH .Net Framework V2.0\CITYMH\Data\Oracle\Client\OracleClientHelper.vb:line 431
I tried the workaround conveyed in KB article 329163 (changed the parameter directions to InputOutput and set an initial value of 0)
While this did stop the above error from occuring, it also prevented any error from coming back from the stored procedure. I need to be able to catch the ORA-01403 that should be coming back from the stored procedure and convey the "data not found" error to the user. Therefore, this workaround cannot be used
I am using the following products
Microsoft.NET Framework 1.1 Version 1.1.432
MDAC 2.
Microsoft Visual Basic .NET 69461-270-0000007-1888
Oracle Client 8.1.7 Release
If there is a fix available, please advise
If you require any additional information, please let me know
Thanks