TheSwamp

Code Red => .NET => Topic started by: nobody on February 05, 2021, 04:22:10 PM

Title: If & Commit
Post by: nobody on February 05, 2021, 04:22:10 PM
Does return prevent a function from completing a transaction? Thinking I should be committing a transaction before a return if I use it.

transaction
{
if (something == null)
   {
    transaction.Commit();
    BEFORE return;
   }
transaction.Commit();
}
Title: Re: If & Commit
Post by: JohnK on February 05, 2021, 07:50:14 PM
Return terminates everything but if you have it in a try block I think the finally block still runs.
Title: Re: If & Commit
Post by: nobody on February 06, 2021, 04:40:19 PM
Thanks No. 7, are you 7 of 9?
Title: Re: If & Commit
Post by: JohnK on February 06, 2021, 10:30:06 PM
Not sure but I guess, if 6 was 9 (https://www.youtube.com/watch?v=vZuFq4CfRR8) then I might be 4 of 6.
Title: Re: If & Commit
Post by: nobody on February 08, 2021, 07:31:20 PM
Well, this used to be 7 of 9. I think you'd know if you were this 7.  At least I hope so.


EDIT (John): Removed attachment before I get a PM (better safe then sorry).
Title: Re: If & Commit
Post by: JohnK on February 08, 2021, 08:39:38 PM
Nope. That's not me (sorry :]). I'm not big on fantasy art. About the closest I got was a kandinsky print having on an apartment wall.
Title: Re: If & Commit
Post by: nobody on February 09, 2021, 12:45:33 PM
Nope. That's not me (sorry :]). I'm not big on fantasy art. About the closest I got was a kandinsky print having on an apartment wall.

That "Fantasy Art" made billions lol... that was Star Trek
Title: Re: If & Commit
Post by: JohnK on February 09, 2021, 02:28:50 PM
Oh I thought you meant a painter...an artist that painted artwork?! *duh!* Sorry.

Oh, that 7 of 9! I thought that lady looked familiar. ...anyways; no, I'm on the other team from that 7 of 9.


*Phew!* sorry! that joke was belabored and beaten to death! my bad. I will try to do better next joke.