Subject [ib-support] Re: (unknown)
Author Svein Erling Tysvær
Hugh,
why don't you first update PTDEMOG.SPECIMENID in your BI trigger, and then
set SPECNO.SPECIMEN_NO to this value in the AI trigger?

I don't think AI triggers are supposed to update the same record as
triggers it.

Set

>Set,
> I had made the trigger for the PTDEMOG table. Perhaps I am going
>about this all wrong. This database is for medical pathology cases. I
>am trying to store PDF report images for archival purposes. I strip
>all the text out of the PDF and parse it into PTDEMOG table. I
>assumed everything would link to the specimen number,ie. AP2002-1234,
>so I set up a table SPECNO and when an entry is made to PTDEMOG, the
>SPECNO table is checked for the existance of the specimen number
>PTDEMOG.PATHNO. If not, a record is added to table SPECNO. I then
>wanted to link PTDEMOG to SPECNO through PTDEMOG.SPECIMENID -
>SPECNO.SPECIMEN_NO. I thought after the entry into SPECNO and the
>Post of the PTDEMOG, the SPECIMENID could be set to
>SPECNO.SPECIMEN_NO based on the common PATHNO field.