I have a select query on a relational table in a plsql procedure.
I want to convert the results of this query into a user defined type object to return via odp.net.
How would I go about doing this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
(this is from one of my other post today)
this is a walkthrough on getting started: http://www.oracle.com/technology/obe/hol08/dotnet/udt/udt_otn.htm
while this is a bit more detailed: http://download.oracle.com/docs/html/E10927_01/featUDTs.htm
but the real meat & potatoes are already installed on your computer after you install ODP in the Samples directory: %ORA_HOME%\product\11.1.0\client_1\odp.net\samples\2.x\UDT
but the pl/sql side of things:
First create the singleton udt to handle one row at a time
follow the directions in the above links to get the .net side insynch
NOW FOR A COLLECTION:
then in the .net side of things this will effectively be a value of TESTTYPE()
Now to save you some time you can use the RETURNING clause on INSERT/UPDATE/DELETES
as such
unfortunately it seems that you cannot do a
so instead of rote COPING FROM THIS SITE, IT TELLS OF A “work-around” TO GET THE BULK COLLECT TO WORK IN AN INSERT STATEMENT
http://www.oracle-developer.net/display.php?id=413