Subject | [IBO] Re: Transaction pausing |
---|---|
Author | jeffplata |
Post date | 2005-08-02T05:29:16Z |
Hi Geoff,
Pls see inline.
<quote help file>
In the demonstration application you will find a timer which initiates
the following function (the timer is set to 1 second for demonstration
purposes, I would suggest that in a real application the timer could
be set to once per minute or even longer).
procedure TTransactionMainForm.TransactionTimerTimer(Sender: TObject);
begin
UpdateTransactionList;
CheckTransactions;
end;
</quote help file>
Compare it with the code:
procedure TTransactionMainForm.TransactionTimerTimer(Sender: TObject);
...
begin
iList := TIB_Session.DefaultSession.Session_Transactions;
TransactionStateGrid.RowCount := iList.Count + 1;
for i := 0 to iList.Count - 1 do
begin
iTran := TIB_Transaction(iList.Items[i]);
TransactionStateGrid.Cells[0,i+1] := GetCompDesc( iTran );
TransactionStateGrid.Cells[1,i+1] := GetBoolText( iTran.Started );
TransactionStateGrid.Cells[2,i+1] := GetBoolText( iTran.IsPaused );
TransactionStateGrid.Cells[3,i+1] := GetTimeText( iTran.TimeActive );
TransactionStateGrid.Cells[4,i+1] := GetStateText( iTran );
TransactionStateGrid.Cells[5,i+1] := GetBoolText(
iTran.InTransaction );
TransactionStateGrid.Cells[6,i+1] := IntToStr(
iTran.PostPendingCount );
end;
end;
One more thing, UpdateTransactionList is not in the source anymore.
Well, if the demo is not given much attention anymore after all the
new enhancements in IBO, do we suppose that IBO has already outgrown
such implementation of transaction pausing? Is there a better way now?
Thanks again.
Jeff
Pls see inline.
> Did you uncomment the two lines highlighted below?I did.
> > The help file does not fully jive with the code.This is only one instance I've seen so far:
> Can you elaborate?
<quote help file>
In the demonstration application you will find a timer which initiates
the following function (the timer is set to 1 second for demonstration
purposes, I would suggest that in a real application the timer could
be set to once per minute or even longer).
procedure TTransactionMainForm.TransactionTimerTimer(Sender: TObject);
begin
UpdateTransactionList;
CheckTransactions;
end;
</quote help file>
Compare it with the code:
procedure TTransactionMainForm.TransactionTimerTimer(Sender: TObject);
...
begin
iList := TIB_Session.DefaultSession.Session_Transactions;
TransactionStateGrid.RowCount := iList.Count + 1;
for i := 0 to iList.Count - 1 do
begin
iTran := TIB_Transaction(iList.Items[i]);
TransactionStateGrid.Cells[0,i+1] := GetCompDesc( iTran );
TransactionStateGrid.Cells[1,i+1] := GetBoolText( iTran.Started );
TransactionStateGrid.Cells[2,i+1] := GetBoolText( iTran.IsPaused );
TransactionStateGrid.Cells[3,i+1] := GetTimeText( iTran.TimeActive );
TransactionStateGrid.Cells[4,i+1] := GetStateText( iTran );
TransactionStateGrid.Cells[5,i+1] := GetBoolText(
iTran.InTransaction );
TransactionStateGrid.Cells[6,i+1] := IntToStr(
iTran.PostPendingCount );
end;
end;
One more thing, UpdateTransactionList is not in the source anymore.
Well, if the demo is not given much attention anymore after all the
new enhancements in IBO, do we suppose that IBO has already outgrown
such implementation of transaction pausing? Is there a better way now?
Thanks again.
Jeff