Forum Stats

  • 3,783,408 Users
  • 2,254,768 Discussions


Deploying c# procedure with user-defined type

915614 Member Posts: 4
edited Feb 7, 2012 7:13AM in .NET Stored Procedures
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.

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.



  • 915614
    915614 Member Posts: 4
    edited Feb 7, 2012 7:13AM
    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.


    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.
This discussion has been closed.