This discussion is archived
1 Reply Latest reply: Feb 7, 2012 4:13 AM by 915614 RSS

Deploying c# procedure with user-defined type

915614 Newbie
Currently Being Moderated
Hi
I've written a c# procedure which makes use of some Oracle user-defined types (c# classes generated using the wizard).

I will be calling the procedure from an Oracle package and one of the out parameters needs to be one of my user defined Oracle objects (basically a record object). My problem is when I come to deploy the package, it tells me "... does not contain any .NET stored procedures that can be deployed to Oracle"

If I change the user defined type (out param) to something like an Int32 or string, it works fine. AFAIK the latest version of ODT/ODAC supports user defined types. For Info I've 11g Client , .Net v4 & VS2010

quick example of procedure entry point.

works:
public static void GetOrderCost(int OrderNr, out Int32 orderCost )

Not work:
public static void GetOrderCost(int OrderNr, out ORDER_RECORD orderCost ) - Note: ORDER_RECORD is the class created using the class generation wizard.

I've spent 2 days now trying to get this to work, perhaps its not possible or perhaps my setup is not quite right but any help gratefully received.

Ian
  • 1. Re: Deploying c# procedure with user-defined type
    915614 Newbie
    Currently Being Moderated
    think I have found some small print which scuppers my plan. Good if some one could confirm and nicer if someone could suggest a workaround (without resorting to writing the UDT to a Oracle table)

    Oracle User-Defined Type (UDT) Support

    UDTs are not supported within a context connection but they are supported with a client connection. UDTs are not supported as parameters to .NET stored procedures.

    Source:
    http://docs.oracle.com/cd/E14435_01/win.111/e10927/extenRest.htm#CJAHJBJI

    So you can use UDT's within the body of the procedure (and can read them off the DB) but as yet its not possible to use them as parameters.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points