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



Home Answers Viewqa JDBC You handle your own transaction
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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


How do you handle your own transaction ?


Advertisement
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.



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
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 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
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
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
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
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
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
Transaction Management
Transaction Management  How are transactions managed in EJB
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
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
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
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
Java eft transaction
testing. When your Card processor is tested by running the Transaction Processor...(TranReq) method. This method receives a transaction request. Your implementation... of a particular type (savings, current, credit). ? A transaction request
JDBC Transaction Example
; } JDBC Transaction Example JDBC Transaction  JDBC transaction... successfully. When  you create a connection using JDBC, by default it is in auto-commit mode and  each SQL statement is treated as transaction
Implement transaction serializability
Implement transaction serializability  I need to implement transaction serializability in Java using semaphores/monnitors. What is the code to do
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
Hibernate 4.0-nested transaction not suported
Hibernate 4.0-nested transaction not suported  how i do nested transaction using Hibernate 4, i know hibernate 4 does not support nested transaction. Is there any way to do nested transaction like inserting more than one record
Hibernate 4.0-nested transaction not suported
Hibernate 4.0-nested transaction not suported  how i do nested transaction using Hibernate 4, i know hibernate 4 does not support nested transaction. Is there any way to do nested transaction like inserting more than one record
How to Handle Event Handlers?
How to Handle Event Handlers?  How to Handle Event Handlers
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
Could not open JPA EntityManager for transaction
following error: Could not open JPA EntityManager for transaction; nested...; Hi, You application is not able to get the database connection. Check if your application is consuming large number of database connection. Thanks
Advertisements
 

 

 

DMCA.com