OCI Error after upgrading to Oracle 11G R1 and Win 7 from 10G R2 and Vista
2819431Nov 3 2009 — edited Nov 5 2009I keep getting an error stating:
"OCI-22060: argument[2] is an invalid or uninitialized number."
I receive this error in the App_Code where I am calling a PL/SQL procedure returning a cursor.
Here is the code:
Public Shared Function Get_Generic_Filter(ByVal intTBL_DSID As Integer, ByVal intTBL_DCID As Integer) As DataTable
Dim strProcedure As String = "FUNDS_MGMT.OVERVIEW.Get_Generic_Filter"
+'' Connect to the database.+
Using conn As New OracleConnection(FUNDS_Util.FUNDS_ConnectionString)
Using command As New OracleCommand(strProcedure, conn)
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add("p_TBL_DSID", OracleType.Int32, 10).Value = intTBL_DSID
command.Parameters.Add("p_DC_GROUPID", OracleType.Int32, 10).Value = intTBL_DCID
+' TODO: Add the appropriate parameters.+
+'' Add the cursors. These will contain the data we need.+
command.Parameters.Add("cur_PARAM", OracleType.Cursor).Direction = ParameterDirection.Output
Using da As New OracleDataAdapter(command)
da.MissingSchemaAction = MissingSchemaAction.Add
da.MissingMappingAction = MissingMappingAction.Passthrough
da.AcceptChangesDuringFill = True
+'' Now it's time to get the data.+
Dim ds As New DataSet
Try
da.Fill(ds)
Return ds.Tables(0)
Catch ex As Exception
Return Nothing
End Try
End Using
End Using
End Using
+' NOTE: The "Using" structure will dispose of the objects for us, which will also close the connection.+
End Function
I did not have this error until I upgraded to 11G on Windows 7 from 10G R2 on Windows Vista.
I am using the System.Data.OracleClient Version 2.0.0.0
Does anyone have any suggestions?
I would like to keep using the System.Data.OracleClient; however, I was able to get it working using the newer Oracle.DataAccess, Version=2.111.7.10, but I don't want to convert this over just for this one machine.
-Thanks