Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JDBC and Relational Databases
With respect to Batch execution in JDBC
PavanPL KalyanK
Ranch Hand
Posts: 212
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello ,
I am doing insertion operation so keeping all the statements in Batch . On this some statements execute and some are failing .
If a single statement fails , a BatchUpdateException is caught and all other statements are rolled back .
what should i do to in order to accomplish let other statements execute even if some fail.
waiting for your suggestions.
Bauke Scholtz
Ranch Hand
Posts: 2458
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Do not execute them in batch then, but one by one.
PavanPL KalyanK
Ranch Hand
Posts: 212
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Bauke Scholtz wrote:
Do not execute them in batch then, but one by one.
Then what is the use of doing addBatch ?? How can i take the advantage of BatchStatements.
Bauke Scholtz
Ranch Hand
Posts: 2458
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
It is just intented to execute a batch in the DB? Or don't you understand what a batch concerns?
PavanPL KalyanK
Ranch Hand
Posts: 212
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
st.addBatch("INSERT INTO person VALUES('4','Komal')"); st.addBatch("INSERT INTO person VALUES('5','Ajay')"); st.addBatch("INSERT INTO person VALUES('6','Santosh')"); int a[]=st.executeBatch(); catch(BatchUpdateException) { }
I did not get what you mean to say.
Assume this my piece of code . Could you please suggest what are trying to suggest.
PavanPL KalyanK
Ranch Hand
Posts: 212
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks , i got the solution .
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
any java + mysql tutorial with batch processing????
Batch Execution Solution
Thread Newby - Just need a bit of advice
running dos applications through orion
Batch Update question
More...