Subject | Re: [IBO] Prepared and unprepared |
---|---|
Author | Tim Ledgerwood |
Post date | 2003-06-30T10:24:18Z |
Thanks Helen.
I had been taught to close all the data access objects when I am finished
with them, but your advice seems different.
Is this true of all IB data access objects? I mean, for insert, update,
delete, and select transactions could I do the following :
Screen.Cursor := crSQLWait;
Screen.ActiveCustomForm.Refresh;
try
try
begin
with IBQry_GetBatchData do
begin
if not IB_Transaction.InTransaction then
IB_Transaction.StartTransaction;
ParamByName('BATCHNUM').AsInteger := Batch;
ParamByName('TERMID').AsString := TermID;
if not Active then Open else Refresh;
end;
end;
except
on E : Exception do
begin
IBdmMain.HandleException('XYZ');
raise;
end;
end;
finally
begin
Screen.Cursor := crDefault;
Screen.ActiveCustomForm.Refresh;
end;
end;
Regards
Tim
[Non-text portions of this message have been removed]
I had been taught to close all the data access objects when I am finished
with them, but your advice seems different.
Is this true of all IB data access objects? I mean, for insert, update,
delete, and select transactions could I do the following :
Screen.Cursor := crSQLWait;
Screen.ActiveCustomForm.Refresh;
try
try
begin
with IBQry_GetBatchData do
begin
if not IB_Transaction.InTransaction then
IB_Transaction.StartTransaction;
ParamByName('BATCHNUM').AsInteger := Batch;
ParamByName('TERMID').AsString := TermID;
if not Active then Open else Refresh;
end;
end;
except
on E : Exception do
begin
IBdmMain.HandleException('XYZ');
raise;
end;
end;
finally
begin
Screen.Cursor := crDefault;
Screen.ActiveCustomForm.Refresh;
end;
end;
Regards
Tim
[Non-text portions of this message have been removed]