?
Solved

batch updates in dot net using Oracle database

Posted on 2007-11-26
5
Medium Priority
?
1,043 Views
Last Modified: 2013-12-18
hi,

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

thanks
0
Comment
Question by:sitg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 1500 total points
ID: 20349947
0
 

Author Comment

by:sitg
ID: 20350053
hi,

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.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 20350214
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.
0
 
LVL 27

Expert Comment

by:sujith80
ID: 20355258
>> 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.

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

end;
/
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 20357832
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.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question