default value of a column and perform
Posted in 1999
Topics: General Discussion
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
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
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