Subject | Errors |
---|---|
Author | Dion Oliphant |
Post date | 2001-01-08T10:26:33Z |
Hi,
procedure TPupilForm.tvGradeTreeEdited(Sender: TObject; Node: TTreeNode;
var S: String);
begin
with dmPupil do
begin
qryGrades.Open;
qryGrades.Prepare;
if not trnGrades.InTransaction then trnGrades.StartTransaction;
try
try
{ The tree is being edited. Try and update the record on the
database. }
qryGrades.Params[0] := TNodeTypeData(Node.Data^).Ref;
qryGrades.Open;
if trnGrades.InTransaction then trnGrades.Commit;
except on ???????
{ Don't change the node value to the new value. }
abort;
end;
finally
qryGrades.Close;
end;
end;
end;
How do I catch exceptions in IBO(look at ???? above)
Thanks,
Dion.
procedure TPupilForm.tvGradeTreeEdited(Sender: TObject; Node: TTreeNode;
var S: String);
begin
with dmPupil do
begin
qryGrades.Open;
qryGrades.Prepare;
if not trnGrades.InTransaction then trnGrades.StartTransaction;
try
try
{ The tree is being edited. Try and update the record on the
database. }
qryGrades.Params[0] := TNodeTypeData(Node.Data^).Ref;
qryGrades.Open;
if trnGrades.InTransaction then trnGrades.Commit;
except on ???????
{ Don't change the node value to the new value. }
abort;
end;
finally
qryGrades.Close;
end;
end;
end;
How do I catch exceptions in IBO(look at ???? above)
Thanks,
Dion.