I am starting with my porting from FIBPlus to IBDac.
I am getting the following error when executing the following block of code, which is executed when the user hit's the save button on the screen, once he has made changes to the record being displayed.
Code: Select all
procedure TfrmEstimator.btnSaveClick(Sender: TObject);
begin
qryEstimatorMaintenance.Transaction.StartTransaction;
try
qryEstimatorMaintenance.Post;
qryEstimatorMaintenance.Transaction.Commit;
except
on E: Exception do
begin
qryEstimatorMaintenance.Transaction.Rollback;
ShowMessage('Error: ' + E.Message);
end;
end;
Close;
end;
The error occurs on the
Code: Select all
qryEstimatorMaintenance.Transaction.StartTransaction;
I have the following components on the form:
TIBCQuery
TIBCDataSource
TIBCTransaction
When entering the screen the following code is executed to position the record that is being edited.
Code: Select all
procedure TfrmEstimator.FormShow(Sender: TObject);
begin
if fFormAction='Edit' then
begin
frmEstimator.Caption := 'Edit Estimator';
qryEstimatorMaintenance.ParamByName('IRN').AsInteger := fKey;
qryEstimatorMaintenance.Open;
qryEstimatorMaintenance.Edit;
end
else
begin
end;
end;
I am obviously missing something silly over here, could you please point me in the right direction.
Regards
Marius