Subject | RE: [IBO] Error codes |
---|---|
Author | Claudio Valderrama C. |
Post date | 2001-01-06T03:45:03Z |
Exceptions are chained in a hierarchy:
EIB_Error
EIB_StatementError
EIB_DatasetError
EIB_TransactionError
You probably will get EIB_DatasetErrors. I thought that it would be a
descendant of EIB_StatementError but it's a direct descendant of EIB_Error.
Jason, any reason for this?
C.
EIB_Error
EIB_StatementError
EIB_DatasetError
EIB_TransactionError
You probably will get EIB_DatasetErrors. I thought that it would be a
descendant of EIB_StatementError but it's a direct descendant of EIB_Error.
Jason, any reason for this?
C.
> -----Original Message-----
> From: Dion Oliphant [mailto:dion@...]
> Sent: Lunes 1 de Enero de 2001 3:35
> To: IBObjects@egroups.com
> Subject: [IBO] Error codes
>
>
> Hi All,
>
> Could someone please point me in the right direction. Am I using IBO
> correctly?
> Is the structure correct, and how do I get hold of the error
> codes(except on
> ...)?
> Would I also need to check for concurrency here?
>
> if ibDataSource.Dataset = ibGradesQry then
> begin
>
> if not ibGradesTrans.InTransaction then
> ibGradesTrans.StartTransaction;
>
> try
> ibGradesQry.Insert;
> ibGradesQry.FieldByName('GradeName').AsString :=
> edtDescription.Text;
>
> if ibDataSource.Dataset.State in [dssEdit, dssInsert] then
> ibDataSource.Dataset.Post;
>
> { Commit now. If successful, the node can be drawn. }
> if ibGradesTrans.InTransaction then ibGradesTrans.Commit;
>
> { Add Node to tree. }
> NewNode := AddTreeNode(PupilForm.tvGradeTree,
> PupilForm.tvGradeTree.Selected,
>
> ibGradesQry.FieldByName('GradeRef').AsInteger,
> ntLearner, edtDescription.Text);
>
> except on ibGradesTrans.????? // Need to pick up
> possible errors
> from the commit here
> { Could also check here for an exception when the node was
> drawn. }
> if ibGradesTrans.InTransaction then ibGradesTrans.RollBack;
> end;
>
> end;
>
> Thanks,
> Dion
>
>
>
>
>