Calling a function with user defined type parameters (Oracle ODP.NET)?

The udt type must be a class that implements IOracleCustomType and/or IOracleCustomTypeFactory, IOracleArrayTypeFactory.

The udt type must be a class that implements IOracleCustomType and/or IOracleCustomTypeFactory, IOracleArrayTypeFactory unfortuntately you cannot just create a string array and pass it in look in the odp.net samples that come with the odp installation %ora_home%\client_1\odp. Net\samples\4\UDT also check out these links for samples and walkthroughs developergeeks.com/article/35/working-wi... codeproject.com/KB/database/ORACLE_UDT.aspx and st-curriculum.oracle.com/obe/db/hol08/do....

Don't know anything about ODP. Net really, but the error suggests that it doesn't like you trying to use a string array as the value for an Oracle parameter. Which doesn't sound unreasonable.

A quick google of 'odp.net object varchar2' gave this OTN forum post as the first result; it includes an example of using an object about half-way down, including converting to and from Oracle object types.

If I were you I'd have a look at the ODP add-in to Visual Studio. With this you can connect to your database, select a UDT on the database, and "Generate Custom Class" to get a .net class you can use. Look inside the class and you'll see what Harrison means.

Pay particular attention to the OracleObjectMappingAttributes on top of the properties, and the overrides of To/FromCustomObject. When you construct your OracleCommand, the OracleParameter. Value needs to be a class of this type.

That should get you started at a high level. A word of warning, though. The code generated by ODP is ugly to say the least - we're on the point of ditching all ODP-generated classes in our own scenario.

But you'll need to understand what things like IOracleCustomType, IOracleCustomTypeFactory, IOracleArrayTypeFactory, INullable are before you'll be in a position to do this. Incidentally since your specific question surrounds arrays, you might want to look at Oracle NTYPEs here, rather than TYPEs.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions