Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OCI Error after upgrading to Oracle 11G R1 and Win 7 from 10G R2 and Vista

2819431Nov 3 2009 — edited Nov 5 2009
I 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
This post has been answered by Hans Forbrich on Nov 4 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2009
Added on Nov 3 2009
7 comments
1,699 views