A Repasky

A Repasky

  • NA
  • 231
  • 183k

Error on OracleCommand Parameter

Dec 12 2012 1:55 PM
I get an error

Error 65 'Oracle.DataAccess.Client.OracleParameterCollection' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'Oracle.DataAccess.Client.OracleParameterCollection' could be found (are you missing a using directive or an assembly reference?) C:\GE\Ge837\Ge837\Professional.cs 215 34 Ge837

This is a conversion of a VB.NET program and it works there. I just do not know why it does not work in the C#.  I think I am using all the references.  I am just giving you the one line, but I have many fields.

Thanks for any help.
arep 

when I use the line of code, I get the error above

insCmd.Parameters.Item(

where it gets the insCmd from this method


OracleCommand insCmd = CreateHencnpInsCmd();

Here is how I get there.  I have a method CreateHencnpInsCmd that adds the parameter and it has the lines

insCmd.Parameters.Add(

insCmd.Prepare();return insCmd;


":1", OracleDbType.Varchar2, ParameterDirection.Input);

Then

":1").Value = Convert.ToInt32(dr["ActualVisits"]);

Answers (3)