Record.ReadIsolation([IsolationLevel]) Method
Version: Available or changed with runtime version 11.0.
Gets or sets the read isolation level.
Syntax
[ReadIsolation := ] Record.ReadIsolation([ReadIsolation: IsolationLevel])
Note
This method can be invoked using property access syntax.
Parameters
Record
Type: Record
An instance of the Record data type.
[Optional] ReadIsolation
Type: IsolationLevel
The read isolation level.
Return Value
[Optional] ReadIsolation
Type: IsolationLevel
The read isolation level.
Remarks
For more information about read isolation level on record instances, see Record instance isolation level.
Example
The following example shows AL code with SQL isolation level hints annotated on database reads, with record instance isolation level used to override the transaction's isolation level.
local procedure UsingReadIsolation()
var
cust: Record Customer;
otherCust: Record Customer;
curr: Record Currency;
begin
cust.FindFirst(); // READUNCOMMITTED
// Heighten isolation level for Customer table.
cust.LockTable();
// Explicitly select another isolation level than the transaction's.
otherCust.ReadIsolation := IsolationLevel::ReadUncommitted;
otherCust.FindSet(); // READUNCOMMITTED
end;
See Also
Record instance isolation level
Record Data Type
Getting Started with AL
Developing Extensions
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈