Subject RE: [IBO] Simple Question about delete clause
Author Helen Borrie
At 10:34 AM 05-09-01 +0200, you wrote:
> >
> >
> > Hi
> > I have used the TIBDSQL to delete the records with. The records
> > that will be
> > deleted will always be not more than 5 and out of the same table. I dont
> > think for this case sp's or triggers are necesarry. Its not that
> > complex :)
> > I now have a new problem if I use dsql and delete the records it
> > gives me an
> > error. EDatabaseError: IBOQBOM Record not found.
> > IBOQBOM is the dataset from which I delete the records. I only
> > get the error
> > when I refresh the dataset.
> >
>I have written the procedure but it gives me the same error. Will I always
>get this error and need to catch the execption or can I a way synchronise or

Simply include an EXISTS test in your procedure, e.g.

if (EXISTS (SELECT keycolumn FROM aTable
WHERE keycolumn = :keycolumn)) then
delete from aTable WHERE keycolumn = :keycolumn;


All for Open and Open for All
InterBase Developer Initiative ยท