About Question enthuware.ocpjp.v7.2.1195 :
Moderator: admin
- 
				Biplav002
 - Posts: 1
 - Joined: Sat Nov 25, 2017 2:25 pm
 - Contact:
 
About Question enthuware.ocpjp.v7.2.1195 :
c.setAutoCommit(false) is set to false and we are neither setting it to true nor using c.commit(),will commit happen?
			
			
									
									
						- 
				admin
 - Site Admin
 - Posts: 10443
 - Joined: Fri Sep 10, 2010 9:26 pm
 - Contact:
 
Re: About Question enthuware.ocpjp.v7.2.1195 :
No, it will not be committed but the last comment in the given code says, "// continue with existing transaction",  so you don't really have to worry about whether the transaction will be committed or not after that line.
			
			
									
									
						- 
				jme_chg
 - Posts: 29
 - Joined: Sun Feb 07, 2021 6:30 pm
 - Contact:
 
Re: About Question enthuware.ocpjp.v7.2.1195 :
Just to confirm, if there was no if statement at all and you had:
c.rollback(sp1); //*
c.rollback();
at the end, then line * would be redundant as the second line would just undo all?
			
			
									
									
						c.rollback(sp1); //*
c.rollback();
at the end, then line * would be redundant as the second line would just undo all?
- 
				admin
 - Site Admin
 - Posts: 10443
 - Joined: Fri Sep 10, 2010 9:26 pm
 - Contact:
 
Re: About Question enthuware.ocpjp.v7.2.1195 :
Yes, that is correct.
			
			
									
									
						Who is online
Users browsing this forum: No registered users and 10 guests