Home All Groups Group Topic Archive Search About

Strange System.Data.OracleClient behavoir

Author
5 Feb 2007 10:14 PM
LineVoltageHalogen
Greetings All, I have a small .NET C# app that connects to an Oracle
instance and creates tables and some functions and procs.  I am
sending over the DDL and using command.ExecuteNonQuery() to execute
it.  The create table statements work like a charm.  However, when I
send over the DDL for the function it compiles but is left in an
invalid state.  Using a third party GUI tool I try to recompile the
function and I am prompted with:


PLS-00103: Encountered the symbol "" when expecting one of the
following: ( return compress compiled wrapped


If I take the DDL to create the function and run it in SQLPLUS it
works?

Here is the code:

CREATE OR REPLACE FUNCTION MyFunction
RETURN decimal

AS
   -- Variable Declarations
   v_Var    decimal(9,0);

   Begin

   v_Var := 2;

   RETURN v_Var;

   End;


That is exactly what .NET is sending to the Oracle database?

I am on .NET 2.0 and Oracle 10GR2

Any and all help would be greatly appreciated.

TFD

AddThis Social Bookmark Button