Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Edward Rosenthal got error 747 when an insert trigger or stored procedure tried to update company_id on the table just inserted into. Reinhard Habichtsberg explained 747 occurs when the insert names the triggered column; omitting it works in dbaccess, but sperform behaves as if all columns are given. Leaving the column off the form avoids it.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Edward Rosenthal — — source: Informix-list mailing list archive (1991-1998)
hi -
table A
company_name --> constraint on this field, for company(company_name)
company_id
bla
bla
Company
company_name
company_id
i wanted to write an insert trigger for the table A such that after it
is inserted ,
the company_id could be updated from the company table to table A.
i get error 747 on all my attempts, such as a stored procedure which
tries
to update the company_id.
any ideas?
↪ replying to Edward Rosenthal
Chetan Anand — — source: Informix-list mailing list archive (1991-1998)
Edward:
How's trigger statement looks like and with SPL sample. It has never
failed for me.
Rgds
Edward Rosenthal wrote:
> hi -
> table A
> company_name --> constraint on this field, for company(company_name)
> company_id
> bla
> bla
>
> Company
> company_name
> company_id
>
> i wanted to write an insert trigger for the table A such that after it
> is inserted ,
> the company_id could be updated from the company table to table A.
> i get error 747 on all my attempts, such as a stored procedure which
> tries
> to update the company_id.
> any ideas?
Edward Rosenthal <erosenthal@mfi.com> wrote:
> hi -
> table A
> company_name --> constraint on this field, for
company(company_name)
> company_id
> bla
> bla
>
> Company
> company_name
> company_id
>
> i wanted to write an insert trigger for the table A such that
after it
> is inserted ,
> the company_id could be updated from the company table to table A.
> i get error 747 on all my attempts, such as a stored procedure
which
> tries
> to update the company_id.
> any ideas?
>
>
error 747 means that you cannot work on a column with a
triggered action if any action on the column causes the trigger.
Try a simple insert command with dbaccess nor specifying a value
for company_id neither mention the column in your insert statement.
For example:
insert into tableA
(company_name,
bla,
bla)
values
("Informix",
"BLA1","BLA2"
);
Your insert trigger will work with that.
Try the following:
insert into tableA
(company_name,
company_id,
bla,
bla)
values
("Informix",
"",
"BLA1","BLA2"
);
You will get error 747.
Unfortunately the FORMS - program sperform (part of isql)
behaves as if one has specified all columns.
There are similar restrictions with update triggers.
HTH
Reinhard
Reinhard Habichtsberg <Reinhard.Habichtsberg@unilux.de> wrote:
> Unfortunately the FORMS - program sperform (part of isql)
> behaves as if one has specified all columns.
>
To complete: If you do _not_ include the affected column in the
FORM (sperform program) all works fine (see also thread with header:
default value of a column and sperform)
Reinhard
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.