Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC how can we do batch updates using callablestatement interface

Have Programming Question? Ask it here!
 
 
 


Nagendran
how can we do batch updates using callablestatement interface
1 Answer(s)      2 years and 4 months ago
Posted in : JDBC


how can we do batch updates using callablestatement interface


Advertisement
View Answers

May 9, 2012 at 4:38 PM


The batch update is the ability to process more than one statement at once.CallableStatement.executeBatch() method is used to execute the batch of statements.

CallableStatement cstmt = con.prepareCall("{call updatePrices(?, ?)}");
 cstmt.setString(1, "A");
 cstmt.setFloat(2, 8.49f);
 cstmt.addBatch();

 cstmt.setString(1, "B");
 cstmt.setFloat(2, 9.49f);
 cstmt.addBatch();

 int [] updateCounts = cstmt.executeBatch();


Related Tutorials/Questions & Answers:
JDBC add batch, JDBC add batch Example, JDBC add batch example code
. In case of JDBC Batch update you can include many updates in the same batch...JDBC add batch Making JDBC batch update example In this section we will learn how use JDBC add batch to make JDBC batch update. The JDBC batch update
How can we encrypt the username and password using PHP?
How can we encrypt the username and password using PHP?  How can we encrypt the username and password using PHP
Advertisements
How can we create a database using PHP and mysql?
How can we create a database using PHP and mysql?  How can we create a database using PHP and mysql
How can we find the number of rows in a result set using PHP?
How can we find the number of rows in a result set using PHP?   How can we find the number of rows in a result set using PHP
How can we get second of the current time using date function?
How can we get second of the current time using date function?  How can we get second of the current time using date function
JDBC: Batch Insert Example
JDBC: Batch Insert Example In this tutorial, you will learn how to do batch insertion of records using JDBC API. Batch Insert : When you want to insert... insertion concept. We can insert multiple rows using single connection
JDBC: Batch Update Example
concept. We can update multiple rows using single connection in batch update...JDBC: Batch Update Example In this tutorial, you will learn how to do batch update of records using JDBC API. Batch Update : When you want to update
HOW TO DO WEBSITE INTERFACE FOR JAVA MODULE
HOW TO DO WEBSITE INTERFACE FOR JAVA MODULE  Hi , Greetings. I... an interface ? any 3rd party software like frontpage can do or other method ? PLEASE... information etc. All these modules work fine in browser. I use JCreator. How to place
What is the maximum size of a file that can be uploaded using PHP and how can we change this?
What is the maximum size of a file that can be uploaded using PHP and how can we change this?  What is the maximum size of a file that can be uploaded using PHP and how can we change
How can I do it? .click();
How can I do it? .click();  I have a very unusual problem. I want to make a script like this: <script> x = document.getElementById... want that it make mouseup in this element. How can I do it, because if I write
how to fetch data fron facebbok using spring batch and hibernate ?
how to fetch data fron facebbok using spring batch and hibernate ?  how to fetch data from facebbok using spring batch and hibernate ? Means i have to get all details of data from one source like facebook using id ans save all
How do we create session factory in hibernate?
How do we create session factory in hibernate?  Hi, How do we create session factory in hibernate? thanks
How do we create custom component
How do we create custom component  How do we create custom component in JSF. I couldnot find any category for JSF questions
can we use class in jsp which implements interface
can we use class in jsp which implements interface   can we use class in jsp which implements interface
How we can integrate ASP .net website to payment gateway using SOAP xml request and response using wsdl.
How we can integrate ASP .net website to payment gateway using SOAP xml request and response using wsdl.  We have a e-commerce website in ASP.net, c... with wsdl format. As i'm new in development. How i can integrate our website
How can we destroy the cookie?
How can we destroy the cookie?   How can we destroy the cookie
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?  How many ways we can retrieve the date in result set of mysql using php
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?  How many ways we can retrieve the date in result set of mysql using php
How can we know the number of days between two given dates using PHP?
How can we know the number of days between two given dates using PHP?  How can we know the number of days between two given dates using PHP
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?  How many ways we can retrieve the date in result set of mysql using php
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?  How many ways we can retrieve the date in result set of mysql using php
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?  How many ways we can retrieve the date in result set of mysql using php
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?  How many ways we can retrieve the date in result set of mysql using php
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?  How many ways we can retrieve the date in result set of mysql using php
How to design a batch, design a batch, a batch
How to design a batch       Learn how to make a batch for the member of the unity, you can make same design by this example. New File: Create a new document. Circle: Draw a circle
How can we extract string 'roseindia.net ' from a string http://deepak@roseindia. net using regular expression of php?
How can we extract string 'roseindia.net ' from a string http://deepak@roseindia. net using regular expression of php?   How can we extract string 'roseindia.net ' from a string http://deepak@roseindia. net using regular
How can we get the properties (size, type, width, height) of an image using php image functions?
How can we get the properties (size, type, width, height) of an image using php image functions?  How can we get the properties (size, type, width, height) of an image using php image functions
struts2 how can we add an radio button to form using a class(doa)
struts2 how can we add an radio button to form using a class(doa)  Hi... button on the registration form how to do plz help me out here is my code model...; plz sugest me how to use the class means how should i refer it here  
struts2 how can we add an radio button to form using a class(doa)
struts2 how can we add an radio button to form using a class(doa)  Hi... button on the registration form how to do plz help me out here is my code model...; plz sugest me how to use the class means how should i refer it here  
How can we register the variables into a session?
How can we register the variables into a session?  How can we register the variables into a session
How can we repair a MySQL table?
How can we repair a MySQL table?  How can we repair a MySQL table
How can we know that a session is started or not?
How can we know that a session is started or not?  How can we know that a session is started
How we can create a table through procedure ?
How we can create a table through procedure ?  How we can create a table through procedure
how can we store the encrypted passwaord in swings?
how can we store the encrypted passwaord in swings?   how can we store the encrypted passwaord in swings
How can we save a data list in jsf?
How can we save a data list in jsf?  I have a code in jsf that fires a query in Data Base each time it is called, i have added a validation check... it is called again. I tried using save State but it did not help as other functions got
how we can create website through java
how we can create website through java  Dear actually i wanna ask query about creation of website through java then how we can create web site through java plz help me..........i have already a web site ....specially for premium
How can we get hibernate statistics?
How can we get hibernate statistics?  Hi, How can we get hibernate statistics? Thanks,   Hi, The Hibernate statistics is one of the most usable feature of Hibernate, having some hidden concepts, is the power
How can we destroy the session, how can we unset the variable of a session?
How can we destroy the session, how can we unset the variable of a session?  How can we destroy the session, how can we unset the variable of a session
how can i do group tagging in portlet factory
how can i do group tagging in portlet factory  how can i do group tagging in portlet factory
PreparedStatement using batch update - Java Beginners
PreparedStatement using batch update  How to execute different preparedStatement object using batch update(Java) Pls explain with the code... object.i want to use more than one..can i do
Using image in WML We can use the
this lesson we will write application that images. We can use..., in that case we can use the alt property of <img>... Using
Statement Batch Update
; In this section we are going to learn about the batch update and how to use it. Here, we are providing an example with code to execute the statement in a batch. Batch updates means more than one statements are executed
Can an Interface implement another Interface?
Can an Interface implement another Interface?   Hi, Can an Interface implement another Interface? Thanks
Can an Interface extend another Interface?
Can an Interface extend another Interface?   Hi, Can an Interface extend another Interface? thanks
JDBC Batch Processing
JDBC Batch Processing In this section we are discussing about JDBC Batch processing. You will learn how to write Java programs for JDBC batch processing... concepts. We have given many examples to help you in mastering the JDBC Batch
Alter Database Table Using JDBC Batch Process
Alter Database Table Using JDBC Batch Process: In this example, we are discuss about alter database table using JDBC Batch process. First of all, we...;passsword"); Now we will used sequence of the step for Batch processing
JDBC Batch executeBatch() Method Example
JDBC Batch executeBatch() Method Example: In this example, we can evaluate... object. In this example, we are discuss with SQL delete statement with batch. We...=3"; stmt.addBatch(insertquery1); Now execute this batch by using
How many ways we can give the output to a browser?
How many ways we can give the output to a browser?  How many ways we can give the output to a browser
How can we submit a form without a submit button?
How can we submit a form without a submit button?  How can we submit a form without a submit button
How can we increase the execution time of a php script?
How can we increase the execution time of a php script?  How can we increase the execution time of a php script
 

 

 

DMCA.com