Subject | Post on insert is fetching all rows |
---|---|
Author | consultor_cys |
Post date | 2004-08-10T22:26:25Z |
Is that normal?
I have a common routine to do a post on my tables, it also try to
catch some error and rollback the current transaction.
But, when I do an insert and post on a big table, the post command
fetches all records on my table. Even if I change CommitAcion from
caInvalidateCursor to caRefresh. After it I've also made some tests
in other tables and it's fetching all records there too, but, since
they are really small, it isn't wasting much time.
Is it possible to stop that behaviour?
Thanx in advance,
Antonio Carlos
///// --------- snippet
function TDM.Post(dsDataSet: TDataSet; aIgnoreErrors: array of
integer):
integer;
begin
Result := pERR_NOERROR;
try
dsDataSet.Post; (** it lasts 15 seconds here **)
except on E:Exception do begin
if not TrataErro(E, Result) then begin
if ArraySearch(aIgnoreErrors, Result) = -1 then begin
ErrorMessage(E, Result, 'Error posting table:');
end;
CDTransaction.Rollback;
CDTransactionLOG.Rollback;
end;
Exit;
end;
end;
end;
I have a common routine to do a post on my tables, it also try to
catch some error and rollback the current transaction.
But, when I do an insert and post on a big table, the post command
fetches all records on my table. Even if I change CommitAcion from
caInvalidateCursor to caRefresh. After it I've also made some tests
in other tables and it's fetching all records there too, but, since
they are really small, it isn't wasting much time.
Is it possible to stop that behaviour?
Thanx in advance,
Antonio Carlos
///// --------- snippet
function TDM.Post(dsDataSet: TDataSet; aIgnoreErrors: array of
integer):
integer;
begin
Result := pERR_NOERROR;
try
dsDataSet.Post; (** it lasts 15 seconds here **)
except on E:Exception do begin
if not TrataErro(E, Result) then begin
if ArraySearch(aIgnoreErrors, Result) = -1 then begin
ErrorMessage(E, Result, 'Error posting table:');
end;
CDTransaction.Rollback;
CDTransactionLOG.Rollback;
end;
Exit;
end;
end;
end;