Subject Re: [IBO] Record not located to update????
Author Jason Wharton
There are actually only rare circumstances that you want IBO to Ignore an
exception from the server. Abort is the most preferred way to respond.

You know in the DOS days, Abort, Retry or Fail? Kind of the same thing...

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Dion Oliphant" <dion@...>
To: <IBObjects@egroups.com>
Sent: Tuesday, January 16, 2001 1:14 PM
Subject: RE: [IBO] Record not located to update????


> Jason,
>
> I still don't understand what effect RaiseException has. When I set it to
> false I get a different error('Record not located ...) and when it is
true,
> I get the expected one(Lock...). SysUtils.Abort has the desired effect
> though.
>
> Thanks,
> Dion.
>
>
> -----Original Message-----
> From: Jason Wharton [mailto:jwharton@...]
> Sent: 16 January 2001 06:52
> To: IBObjects@egroups.com
> Subject: Re: [IBO] Record not located to update????
>
>
> You can show the message that you want and then call SysUtils.Abort to
raise
> a silent exception instead of letting it go forward any more.
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: "Dion Oliphant" <dion@...>
> To: <IBObjects@egroups.com>
> Sent: Tuesday, January 16, 2001 8:39 AM
> Subject: RE: [IBO] Record not located to update????
>
>
> > Hi All,
> >
> > I have 2 apps running. One of these has a record posted, but not
> committed.
> > I try to edit this record in the second app, but have the following
> problem
> >
> > The transactions Isolation is tiCommitted.
> >
> > A transaction is explicity started in the datasource's OnStateChanged
> event.
> >
> > if (Assigned(ADataset)) and (ADataset.State in [dssEdit, dssInsert])
> then
> > { Start the Transaction. }
> > if not ADataset.IB_Transaction.InTransaction then
> > ADataset.IB_Transaction.StartTransaction;
> >
> > I have a TIB_Edit Linked to the above TIB_Datasource.
> > The record is edited with this component.
> >
> > I have a TIB_UpdateBar connected to the TIB_Datasource,
> > and TIB_TransactionBar connected to a TIB_Transaction component.
> >
> > The OnError event for the TIB_Query i the following:-
> >
> > with dmPupil do
> > begin
> > { Display the appropriate error message on the bar. }
> > if ERRCODE = ecLockConflictNoWait then
> > begin
> > { Record is being edited by someone else. }
> > ilPupil16.Draw(PupilForm.StatusBar1.Canvas, 1, 1, 2);
> > PupilForm.StatusBar1.Canvas.TextOut(20, 3, '[DEADLOCK]: User ...
on
> > station ... is editing this record');
> > end
> >
> > else if ERRCODE = ecForeignKeyViolation then
> > begin
> > { The Grade has Class dependents. }
> > ilPupil16.Draw(PupilForm.StatusBar1.Canvas, 1, 1, 2);
> > PupilForm.StatusBar1.Canvas.TextOut(20, 3, 'Delete dependent
Classes
> > first...');
> > end;
> >
> > { Automatically undo all changes done. }
> > if Sender is TIB_Query then
> > if TIB_Query(Sender).IB_Transaction.InTransaction then
> > TIB_Query(Sender).IB_Transaction.RollBack;
> >
> > If the post is successful, I commit in the AfterPost event of the
> > TIB_Query:-
> >
> > if IB_Dataset.IB_Transaction.InTransaction then
> > IB_Dataset.IB_Transaction.Commit;
> >
> > If I set RaiseException to false, I get a 'Record not located to be
> > updated'.
> > If I set it to true, I get the 'Lock conflict on ...' error. ???
> >
> > I dont want the user to see the default error...
> >
> > Thanks,
> > Dion
> >
> >
> > -----Original Message-----
> > From: Dion Oliphant [mailto:dion@...]
> > Sent: 16 January 2001 09:40
> > To: IBObjects@egroups.com
> > Subject: [IBO] Record not located to update????
> >
> >
> > Hi All,
> >
> > Has anybody found the solution? I am currently installing the latest
> version
> > of IBO. I get this error when posting to an IB_Grid.
> >
> > Thanks,
> > D.
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>
>
>