batch updates in dot net using Oracle database


i have to do 56 insertion records on a single postback.

any body tell me how to use batch update of oracle in dot net.

or any other optimized way

Who is Participating?
sitgAuthor Commented:

but it works for only one type of query.
 But i have three queries which are executed 17 times each.

i wanted to supply all the queries once to the oracle.

is is possible.
no that's not possible.

the closest you could get would be a pl/sql procedure that does the 3 queries for you,  doesn't really reduce the work load at all. but might make your code simpler.
>> or any other optimized way

You could make use of array insertions( bulk operations) in oracle pl/sql. The data in the array is sent as a single unit.This reduces the network round trips between your calling program and the database server.

The pl/sql code takes the following form.

 -- array type declaration
 -- array variable declaration
 forall in in <array variable>.first..<array variable>.last
  insert into <your table>(column name) values(<array variable1>(i), <array variable2>(i).....);

that's essentially the same thing as the bulk operations with array binding except you're bulk binding pl/sql arrays instead of c# arrays.

Unfortunately, that doesn't help the problem of trying to do 3 different things.    If all the data could be passed to a single stored procedure as suggested above, then the contents of that procedure might look something like sujith80's template code, except copied 3 times, once for each query.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.