简体   繁体   English

AnyDAC(FireDAC)-在TBlobField.GetAsString之后打开事务

[英]AnyDAC (FireDAC) - Open transaction after TBlobField.GetAsString

at the moment we are migrating the database component of our Delphi7 application from the BDE components to the AnyDAC (FireDAC) Version 8.0.5 components. 目前,我们正在将Delphi7应用程序的数据库组件从BDE组件迁移到AnyDAC(FireDAC)版本8.0.5组件。

The following prerequisites are given: 给出以下先决条件:

  • On our form we have one TADConnection, one TADQuery and one TADTable. 在我们的表单上,我们有一个TADConnection,一个TADQuery和一个TADTable。 The TADQuery is the MasterSource for the TADTable. TADQuery是TADTable的MasterSource。 No special changes have been made to the settings of the AnyDAC components, so the AutoCommit mode is active. 无特殊变化已经做出了AnyDAC组件的设置,所以自动提交模式是有效的。
  • Furhtermore we have one TDBMemo on our form which is linked to an ftMemo field of the TADTable (Firebird FieldType = Blob / Size = 240 / Subtype = Text) 此外,我们在表单上有一个TDBMemo,它链接到TADTable的ftMemo字段(Firebird FieldType = Blob / Size = 240 / Subtype = Text)

During the loading of the blob text field content (TBlobField.GetAsString) the TADTable starts automatically an transaction which would not committed . 在加载Blob文本字段内容(TBlobField.GetAsString)的过程中,TADTable自动启动不会提交的事务。

Is this behavior normal? 这是正常现象吗? Do we have any possiblity to avoid this open transaction? 我们是否有可能避免这种公开交易? Please note, deactivating of the AutoCommit is no option at the moment. 请注意,目前无法禁用自动提交功能。

Any help appreciated. 任何帮助表示赞赏。

Yes, that is a normal behavior. 是的,这是正常现象。 So long you are not fetching BLOB data along with the detail tuple, AnyDAC starts an implicit transaction for fetching those BLOB data. 只要您不将BLOB数据与详细元组一起获取,AnyDAC就启动一个隐式事务以获取那些BLOB数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM