You handle your own transaction

Ads

 
 

Share on Google+Share on Google+

Clark
You handle your own transaction
1 Answer(s)      7 years ago
Posted in : JDBC

How do you handle your own transaction ?

Ads
View Answers

November 12, 2010 at 5:34 PM


Hi friends,

Connection Object has a method called setAutocommit(Boolean istrue) - Default is true. Set the Parameter to false, and begin your transaction Example:

Connection con = getConnection();

con.setAutocommit(false);

//other code

con.commit();

con.close();

Thanks.


Ads









Related Tutorials/Questions & Answers:
You handle your own transaction
You handle your own transaction  How do you handle your own transaction
Importing Your Own Package
Importing Your Own Package  I would like to know if it is possible to create a class with your own methods so that you can import them when writing programs
Advertisements
Java transaction
Java transaction  How do you handle your own transaction
How to handle Transaction IN and OUT in Inventory using java
How to handle Transaction IN and OUT in Inventory using java  Hi... automatically on load. This is the process for Transaction IN. We scan the items again... dt.of.out transaction,90 respectively. This is the process of OUT Transaction
Creating your own package in java
the real classes in the package. To know more about how to create own package and subpackage click on the following links Create Your Own Package Create
Create your own Notepad in Java
Create your own Notepad in Java           You must have worked with Notepad to write programs. Now its turn to create notepad by own with the help of java language
What is "Bring Your Own Device" (BYOD)?
What is "Bring Your Own Device" (BYOD)? Bring your own device or as commonly... of desktops all over the world in an unprecedented way. By referring to bring your own... is referred as bring your own device or BYOD policy. Here we would see various
How can you handle form in Spring 3.2 MVC?
How can you handle form in Spring 3.2 MVC?  Hi, How can you handle... the How can you handle form in Spring 3.2 MVC?   Hi, This article.... For more please visit the How can you handle form in Spring 3.2 MVC
Transaction
the transaction so I need to use the TransactionProxyFactoryBean. My question is that can I use the advice as well as the spring provided transaction in the same person bean as a AOP. I don't want to write the code for transaction, just want
how can you calculate you your age in daies??
how can you calculate you your age in daies??  **hi, I am beginner... of your date of birth: "); int day=input.nextInt(); System.out.print("Enter month(in number) of your date of birth: "); int month
What would you rate as your greatest weaknesses?
What would you rate as your greatest weaknesses... imbalances in your personal life. It is also possible that they are assessing how you... this question. (This gives the impression that you are searching your memory for some
When you look back on the position you held last, do you think you have done your best in it?
; If you say that you did, it could mean that your best is already... don’t give your all to the work at hand. You should therefore indicate that you always put in your best efforts. Also show that this time of your career
Website Development Applications ? Design Your Own Website At The Drop Of A Hat
you can get started on your own. Easy to use templates Even with the basics.... This will provide the basic structure that you can use. You just have to add your own text... will have your own website up and running. You can see the benefits that website
Hibernate Transaction
Hibernate Transaction In this tutorial you will learn about the Transaction in Hibernate. In transaction multiple operations are gathered into a single unit... code as example that will demonstrate how may you use the Hibernate Transaction
Would you initialize your strings with single quotes or double quotes?
Would you initialize your strings with single quotes or double quotes?  Would you initialize your strings with single quotes or double quotes
what is Set Transaction?
your current transaction, not other users or other transactions. Your transaction ends whenever you issue a COMMIT or ROLLBACK statement. Thanks...what is Set Transaction?  what is Set Transaction?   Hi
Commiting and Rolling Back transaction
call  conn.commit();. If any error occurs you can roll back your transaction...; } Rolling Back Transaction When you do any operation such as , SELECT... one transaction at a time you need to set connection object auto-commit(false
Distributed transaction in java
-small; text-decoration: underline; } Distributed Transaction in java EE In distributed java enterprise application, transaction is processed by Transaction Manager. Transaction manager is the primary component of distributed
Create Your Own Package
Create Your Own Package      ... HelloWorld.java Run the program. If you try to run this program, you...: Compile in the same directory:  If you have a hierarchy
Transaction Management
Transaction Management  How are transactions managed in EJB
Maven Dependency commons-transaction >> 1.2
You should include the dependency code given in this page to add Maven Dependency of commons-transaction >> commons-transaction version1.2 in your project
Turning transaction off and on
; } Turning Committing Transaction Off and On When you do any operation such as , SELECT, INSERT, DELETE, or UPDATE  in database then the transaction.... To commit more than one transaction at a time you need to set connection object
Your competitor presses you to reveal some confidential information about your current or previous employer.
Situation: Your competitor presses you to reveal some confidential... placed on you, just as the interviewer would expect their own employees to behave while talking with their competitors. Whenever your own achievements have
I think you should be earning more money at this point of your career. Why isn?t it happening?
I think you should be earning more money at this point of your career. Why... negotiating your salary. However your answer should explain why you are earning something below the industry standards. Your answer should state that you do like
How to Handle Event Handlers?
How to Handle Event Handlers?  How to Handle Event Handlers
JDBC Transaction Example
JDBC Transaction Example JDBC Transaction  JDBC transaction is used.... When  you create a connection using JDBC, by default it is in auto-commit mode and  each SQL statement is treated as transaction
Version of commons-transaction>commons-transaction dependency
List of Version of commons-transaction>commons-transaction dependency
Keep Your Current Job While You Seek a New One
Keep Your Current Job While You Seek a New One  ... well as long as you are in your current job. Here are a few things that could... and to whom you are sending your resume. Some job portals have the option
How would you honestly evaluate the strengths and weaknesses of your previous/current company/boss/team?
How would you honestly evaluate the strengths and weaknesses of your... deal with a situation like this. You might be really tempted to unburden your soul... points. Remember, your loyalty is coming under scrutiny here. If you criticize
iphone handle orientation change
iphone handle orientation change   How can i handle the orientation change in iPhone / iPad application? Please suggest. Thank in Advance
class with in its own objects?
class with in its own objects?  Is it a good idea to declare a class with in its own objects

Ads

 
Advertisement null

Ads