JDBC Tutorial for Beginners #10 : Batch Operations

Genuine Coder
Genuine Coder
5.7 هزار بار بازدید - 8 سال پیش - It is a little tiring
It is a little tiring to do single operation with each execution. JDBC provides an option to do batch operations.

The addBatch() method of Statement, PreparedStatement, and CallableStatement is used to add individual statements to the batch. The executeBatch() is used to start the execution of all the statements grouped together.

The executeBatch() returns an array of integers, and each element of the array represents the update count for the respective update statement.

This tutorial series covers following topics
■ Connecting Java Program to MySQL Database
■ Inserting data into database
■ Fetching data from database
■ Updating an entry in database
■ Deleting an entry from database  
■ Creating a table programmatically
■ Using PreparedStatements
■ Display database contents in JTable
■ Calling stored procedures
■ JDBC Batch operations

- Genuine Coder
http://www.genuinecoder.com/
8 سال پیش در تاریخ 1395/12/06 منتشر شده است.
5,778 بـار بازدید شده
... بیشتر