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



Home Answers Viewqa JDBC define transactions
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Nagendran
define transactions
1 Answer(s)      2 years and 7 months ago
Posted in : JDBC


define transactions


Advertisement
View Answers

May 9, 2012 at 4:41 PM


Whenever a connection is created by using the JDBC, then by default it is in auto- commit mode. This means that SQL statement will be automatically committed immediately after it is executed and it is treated as a transaction. But imagine a situation where you want to execute a batch of statements, either they should commit at on go or they should get failed together. For this we need to disable the auto- commit mode by using the method:

con.setAutoCommit(false).

After setting the auto- commit as false, no SQL statement will be committed until we call the con.commit() method. If there arises any problem while committing then the set of statements will be rollback, without committing.



Related Tutorials/Questions & Answers:
managing the transactions
should i write in EJB (i am using SEAM) to manage the transactions
a class named Transactions
a class named Transactions  Write this java code for me: a class named Transactions that holds the memo and the amount of a transaction. Prompt the user for the number of transactions and create a new Transaction object
Advertisements
Define HibernateTemplate?
Define HibernateTemplate?  Hi, Define HibernateTemplate? Thanks
Chapter 11. Transactions
;TransactionsIdentify correct and incorrect statements or examples about EJB transactions... transactions. The Enterprise JavaBeans architecture allows an application... (BMT) demarcation, the enterprise bean code demarcates transactions using
Define stack
Define stack  hii, Explain stack
Define please!?!
Define please!?!  What is tree map sort
define a constant.
define a constant.  How do you define a constant?   Hi, With the help of define() directive, you can create constant in php. And here is how: <?php define('NAME', 'Bharat'); ?> Thanks
Chapter 5. EJB transactions
transactions Build EJBs which satisfy transactional requirements EJB transactions are a set of concepts and a set... transactions; the container must do everything. Therefore, if your transaction
Define Simulation
Define Simulation  hello,, Explain Simulation?   hii, Simulation is the process of forming an abstract model from a real situation in order to understand the impact of modifications and the effect of introducing
Define stack
Define stack  hii, Explain stack?   hello, Stack is an ordered list in which all the insertions and deletions made at one end called top of the stack. It is referred as LIFO list. Last inserted item is deleted First
Define hiberanate
Define hiberanate  What is Hibernate?   Hibernate is a pure java ORM (object-relational mapping) and persistence framework that allows you to map POJO (Plain Old Java Obiect) to relational database tablea using(XML
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
Define the session factory interface in hibernate?
Define the session factory interface in hibernate?  Define the session factory interface in hibernate?   Session factory is used... that is reusable between transactions at a process, or cluster
php define variable
php define variable  How to define a simple and a global variable in PHP
php define array
php define array  How to define array in PHP
define string variable in php
define string variable in php  how to define string variable in PHP
define a constant in php
define a constant in php   hii, How do you define a constant in php?   hello, we can define a constant in php like this define ("CONST", 50
Define computer software.
Define computer software.  How to define a computer software?   A computer software is a set of instruction that tell the computer what to do
user define exception programs
user define exception programs  user define exception programs   Please visit the following links: http://www.roseindia.net/java/java-exception/user-defined-exception.shtml http://www.roseindia.net/java/exceptions
Define float in Java
Define float in Java  Hi, What is the correct method to define... JavaFloatExample { /* Learn How to define and use float variable in Java...); } } Thanks  public class JavaFloatExample { /* Learn How to define
objective c define float
objective c define float  Hi, How to define float variable in objective c? Thanks   Hi, Here is the example of defining float variable. float i; i=10; Thanks   Hi, Here is another example: // File
Define Tag:
Define Tag:       bean:define Tag - is used to define a scripting variable based on the value(s) of the specified bean... as null. bean:define Tag can't be used  to instantiate a DynaActionForm
When will you define a method as static?
When will you define a method as static?  Hi, When will you define a method as static? thanks
How do you define a constant?
How do you define a constant?  How do you define a constant in php
need complete jsp code for transactions using mysql - WebSevices
need complete jsp code for transactions using mysql  iam doing online banking project.i want the code to transfer funds from one account to another... to lasya or lasya to prathika. I need complete jsp code for transactions using
How to define a constant variable in Java?
How to define a constant variable in Java?   Hi, How to define a constant variable in Java? thanks   HI, The Constants variables are declared using the final keyword. The values of the constant can't be changed
import user-define package - Applet
import user-define package  how to import user-define package to the frame/graphic of the applet. could i create a new frame or not ?? please help me ...  Hi friend, import java.io.*; import java.awt.*; import
Advertisements
 

 

 

DMCA.com