Home |Login| Search |  Newsletter 
English Russian
Devrace FIBPlus is a fast, flexible and high-performance component library for Borland® Delphi" 5-7, Borland® C++ Builder 5-6 and Borland® Kylix" 3 intended for work with Borland® InterBase® and Firebird using direct InterBase API. FIBPlus combines simplicity of architecture with development convenience that enables to create powerful and effective applications. FIBPlus allows use of all InterBase features and benefits: array-fields, blob-fields, generators and full control of transactions, support of all standard and third-party visual db-aware components, special features for optimization of InterBase net-traffic and a set of special design-time experts.


Products


Support


Download


Online shop


Press-releases


About company
  DEVRACE FIBPLUS
Printable

FIBPLUS

News, Events

Feature Matrix
System Requirements
Benefits
Free Trial Download

White Papers
Who uses FIBPlus
Testimonials
Screenshots

Order Now!
Geography of sales

FAQ
HelpDesk
Bug Tracker
Newsgroups

Feedback

GENERAL

Free download
Online shop
Support

COMPANY

About us
Partners
Press releases
Contact us


Devrace is Borland Technology Partner

We are member of Firebird community


Powered by Bitrix Site Manager - Content Management & Portal Solutions
Powered by Bitrix Site Manager - Content Management & Portal Solutions


FIBPlus. Master-detail. Step 3. AutoCommit Mode. Work in the context of two transactions for avoiding DEADLOCK

Viewed: 576

Step 3. AutoCommit Mode. Work in the context of two transactions for avoiding DEADLOCK.

pFIBDataSet allows to commit the made changes automatically if you set AutoCommit to True. Now after calling the Post method, pFIBDataSet1 will automatically call pFIBTransaction1.CommitRetaining, saving the changes without closing the query. Such approach decreases the probability of Deadlock, which is possible in the presence of long unclosed transactions, in the context of which were made data changes.

But FIBPlus gives another capability, which practically reduces the probability of Deadlock to zero. TpFIBDataSet can work in the context of two transactions, a long one in the context of which the data are only read and a short one, in the context of which there executed all modifying queries.

Let's rename pFIBTransaction1 into ReadTransaction and add another component called WriteTransaction. After this we set UpdateTransaction of pFIBDataSet1 in WriteTransaction. Thus pFIBDataSet1 is connected to both components of TpFIBTransaction at once:

Figure 13.

Now after calling the Post method pFIBDataSet1 will call Commit of WriteTransaction. But taking into account the fact that the data are read in the context of a different transaction (ReadTransaction), it will not cause close of pFIBDataSet1. So using FIBPlus we have a real AutoCommit mode, which decreases the possibility of Deadlock and does not prevent us from seeing all actual record values. You might know that while using BDE in the AutoCommit mode you cannot get real record values without reopening the query.

See the full example code.

Return to the list


Opinions

* Put your opinion here.
* This dialog does not support HTML.

Your name: 

Return to the list



Feedback Site map FAQ Contact us
Legal Notices :: Privacy Policy