Andrey Maximenko. Ukraine
Member²
I'm using TOracleDataset in the memory-table mode:
And TOracleDataSet still performs the Lockpoint operation.
Recording 5000 records into TOracleDataset takes 5 seconds.
If disable Lockpoint operation, recording 5000 records into TOracleDataset takes 0.1 seconds.
How about this code
change to
?
Code:
procedure TFormSelectIn.ods_selectApplyRecord(Sender: TOracleDataSet;
Action: Char; var Applied: Boolean; var NewRowId: String);
begin
Applied := true;
end;
And TOracleDataSet still performs the Lockpoint operation.
Recording 5000 records into TOracleDataset takes 5 seconds.
If disable Lockpoint operation, recording 5000 records into TOracleDataset takes 0.1 seconds.
How about this code
Code:
if Updating and (LockingMode in [lmCheckImmediate, lmLockDelayed]) then
LockRecord(False) // Also sets lockpoint
else
Lockpoint;
LockpointSet := True;
if Inserting then c := 'I' else c := 'U';
NewRowId := '';
if ApplyRecord(c, NewRowId) then
change to
Code:
if Inserting then c := 'I' else c := 'U';
if NOT ApplyRecord(c, NewRowId) then
begin
if Updating and (LockingMode in [lmCheckImmediate, lmLockDelayed]) then
LockRecord(False) // Also sets lockpoint
else
Lockpoint;
LockpointSet := True;
end;
NewRowId := '';
if ApplyRecord(c, NewRowId) then
?
Last edited: