Subject | Re: [IBO] Thread - Explict Logic Transactions |
---|---|
Author | Vincenzo Scarpellino |
Post date | 2004-11-03T07:44:21Z |
This is my code, is it correct to do explicit transaction in a thread or it can be cause of problems ?
procedure TEurStampaThread.Execute;
begin
PostMessage(Handle, WM_NULL, 0, 0);
with FormStLGThread do
begin
try
IBConnect.StartTransaction;
IBOQueryPNO.Open;
IBConnect.Commit;
except
IBConnect.RollBack;
raise;
end;
end
end;
procedure TEurStampaThread.Execute;
begin
PostMessage(Handle, WM_NULL, 0, 0);
with FormStLGThread do
begin
try
IBConnect.StartTransaction;
IBOQueryPNO.Open;
IBConnect.Commit;
except
IBConnect.RollBack;
raise;
end;
end
end;
----- Original Message -----
From: Jason Wharton
To: IBObjects@yahoogroups.com
Sent: Tuesday, November 02, 2004 6:41 PM
Subject: RE: [IBO] Thread - Explict Logic Transactions
Please be more specific with your question.
Tell us more about what you are doing.
I also recommend you get an upgrade to IBO if you are on 4.0.
I am soon to release 4.5 and we are at 4.3.
Jason Wharton
> -----Original Message-----
> From: Vincenzo Scarpellino [mailto:vincenzoscarpellino@...]
> Sent: Tuesday, November 02, 2004 4:57 AM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Thread - Explict Logic Transactions
>
> Which is best mode in a thread to do an explicit transaction
> with a RollBack when error occur ?
>
> procedure TEurStampaThread.Execute;
> begin
> PostMessage(Handle, WM_NULL, 0, 0);
>
> with FormStLGThread do
> begin
> QueryPNO.Open;
> end
> end;
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Sponsor
Get unlimited calls to
U.S./Canada
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/
b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Stanco del tappetino mouse che hai??
* Stampaci l'immagine che vuoi tu!
*
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid!17&d=3-11
[Non-text portions of this message have been removed]