1

I might be lazy to search this, but I have no idea how to insert an array of records in to an Oracle table using C# and ODP.Net. I have seen basic examples with inserting primitive types but never found any with something like array of records. Any help?

I basically need to have a record type which would have three out of five columns in a table. Then I need to insert an array of values into the table using C# and ODP.Net.

1 Answer 1

2

there are a few ways to do it, you can create a User Defined Type (udt) and a collection of that type and insert it, or you can pass in assoc. arrays (an array per column if you will) to do the insert. I have answered similar questions

for the udt insert Converting oracle query into user defined types in pl/sql

for the assoc. array insert: http://forums.oracle.com/forums/thread.jspa?messageID=4370850&#4370850

but a nice treat is you already have some examples installed %ORA_HOME%\odp.net\samples\2.x\UDT

(there are other examples for the assoc. array and other odp type things)

let me know if this helps

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.