Skip to Main Content

SQL & PL/SQL

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!

Error while calling an procedure using an external table with C#.

MithandirJan 23 2014 — edited Jan 23 2014

Hello,

I am developping a scheduler application with Visual Studio 2010 (C#) to start my PL/SQL procedures.

Everything works fine with every procedure but one who is reading the content of an external table.

Strange thing is when i launch the same procedure with Toad, i have no problem, but when i launch it with my C# code :

            OracleCommand cmdMET = new OracleCommand();

            cmdMET.CommandText = "STG_AE.M_MET_S_EXT_DEFECT";

            cmdMET.CommandType = CommandType.StoredProcedure;

            cmdMET.Connection = con;

            //OracleParameter retvalMET = new OracleParameter("retval", OracleDbType.Varchar2, 50);

            //retvalMET.Direction = ParameterDirection.ReturnValue;

            //cmdMET.Parameters.Add(retvalMET);

            cmdMET.ExecuteNonQuery();

I've got this error :

ORA-29913: error in executing ODCIEXTTABLEFETCH callout

ORA-01722: invalid number

ORA-06512: at "STG_AE.M_MET_S_EXT_DEFECT", line 8

ORA-06512: at "STG_AE.MET_SRC", line 10

ORA-06512: at "STG_AE.MET", line 14

ORA-06512: at line 1

I can't figure out why it works when i launch it with Toad and why i get this error when launching it with C#... Any advice would be great !

Thanks!

This post has been answered by odie_63 on Jan 23 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 20 2014
Added on Jan 23 2014
2 comments
387 views