Skip to content

C#.net accessing an Oracle Database

k_m_ken_zimmerman

Asked Feb 15, 2006, 9:13 AM EST1 answer
Share
LinkedInX
Hello,

I'm trying to access an Oracle database and receive the following error:
{"ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'LOOKUPUSER'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored\n" }

I'm trying to open the database and verify the user. Here is the search parms.

searchCommand.CommandText = AppMain.SchemaName+".LOOKUPUSER";
searchCommand.Parameters.Add("p_Hid", OracleType.VarChar, 30).Direction= ParameterDirection.Input;
searchCommand.Parameters.Add("p_RetVal", OracleType.VarChar, 4000).Direction = ParameterDirection.InputOutput;

Here is the beginning of the stored procedure.

PROCEDURE LOOKUPUSER
  ( p_Hid IN varchar DEFAULT null,
   p_Result IN OUT varchar)
  IS
  variable_name         varchar(8);
  error_msg           varchar(256);
  IdExists           varchar(30) := null;
  inout             varchar2(4000);
.........

Your help is resolving this is greatly appreciated.

Thanks,
Ken

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Anwar Buchoo
    0
    Try replacing:

    searchCommand.Parameters.Add("p_RetVal", OracleType.VarChar, 4000).Direction = ParameterDirection.InputOutput;

    with:

    searchCommand.Parameters.Add("p_Result", OracleType.VarChar, 4000).Direction = ParameterDirection.InputOutput;


    Rgds. ;)
    0