BUlk insert into Oracle using ODP.NET and C#
505551May 5 2006 — edited May 5 2006Hi,
I have a 10g db, with different schemas - each having the same set of tables.
I'm currently doing a bulk insert using associative array passed into an oracle procedures.
My code example is very similar to http://www.oracle.com/technology/books/pdfs/dotnet_ch5_7.pdf
Where i have to declare the different oracle input/output parameters.
Everything is good and works.
But here is a twist, some tables in some schema migh have a subset of columns.
Ex. scmA.tabA - col(a1,a2,a3,a4,a5) and scmB.tabB - col(a1,a2,a3)
The description of these tables are stored in an XML file. My question is
1. Is there a way to do bulk inserts without using associative array in SP?
or what are alternatate solutions for bulk insert in C#.
2. Since i do not want to hard code the oracle procedure's input/output
parameters, is there a way to build the parameter list dynamically based on the
XML file?
So based on scmA.tabA and scmB.tabB -- build dynamically either 5 input
params or just 3 input params.
OracleParameter v_a1 = new OracleParameter("v_a1",
OracleDbType.Varchar2,
ParameterDirection.Input);
Any pointers is greatly appreciated.
Thank-You