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.
Reinhard Habichtsberg found that a column default was ignored when inserting through a PERFORM form in isql 7.20, leaving NULL. Michael Krzepkowski and Art Kagel explained that PERFORM inserts all listed form columns, hard-inserting NULL for blank ones. The fix was to add a DEFAULT clause to the form definition, or omit the field from the form, or port to 4GL. Reinhard confirmed it worked.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
I defined a default value on a column. Inserting a new
row without specifying a value to that column sets
the value of the column to it´s default value.
That works if using a sql statement.
Inserting a new column with a format generated with
perform (isql 7.20) left the value NULL.
Is this a bug?
Am I forced to specify constraints in the format-program?
TIA
Reinhard
↪ replying to Reinhard Habichtsberg
Michael Krzepkowski — — source: Informix-list mailing list archive (1991-1998)
Hi!
Most likely you will have to specify the same default in the form.
When perform inserts the row, it supplies all values overriding the SQL
default. Try with a form that does not include this field at all.
HTH
Michael
Reinhard Habichtsberg wrote:
> I defined a default value on a column. Inserting a new
> row without specifying a value to that column sets
> the value of the column to it´s default value.
>
> That works if using a sql statement.
>
> Inserting a new column with a format generated with
> perform (isql 7.20) left the value NULL.
>
> Is this a bug?
>
> Am I forced to specify constraints in the format-program?
>
> TIA
>
> Reinhard
↪ replying to Reinhard Habichtsberg
kagel@bloomberg.net — — source: Informix-list mailing list archive (1991-1998)
In article <81djbe$rc6$1@news07.btx.dtag.de>,
"Reinhard Habichtsberg" <Reinhard.Habichtsberg@unilux.de> wrote:
> I defined a default value on a column. Inserting a new
> row without specifying a value to that column sets
> the value of the column to it's default value.
>
> That works if using a sql statement.
>
> Inserting a new column with a format generated with
> perform (isql 7.20) left the value NULL.
>
> Is this a bug?
No, perform inserts ALL of the listed columns not just those that
contain input in the form. For columns not input perform hard inserts
a NULL. The solution is to include a DEFAULT clause in the FORM
definition for the columns also or to port the form to 4GL where you
will have more control.
> Am I forced to specify constraints in the format-program?
Basically, yes.
Art S. Kagel
Sent via Deja.com http://www.deja.com/
Before you buy.
Michael Krzepkowski <michaelk@sqlcanada.com> schrieb in im
Newsbeitrag: 383AB11C.A9C5BE2D@sqlcanada.com...
> Try with a form that does not include this field at all.
>
Hi Michael!
Great that works.
Thank you,
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.