Solved

batch updates in dot net using Oracle database

Posted on 2007-11-26
5
1,035 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 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

737 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