This topic is locked

Default database values not used if fields in add view

8/8/2006 8:34:28 AM
ASPRunnerPro General questions
R
rgke author

I have SQL Server table which has, amongst others, two fields set to take default values. If you do not include the fields in the Add view, the default values are used.
However, if you DO include the fields in the Add view, even if you leave them blank, the default values are not used, so the record ends up being inserted without values.
If you make the fields unable to accept NULLS, you get a error message as the POST cannot be made.
I do need the fields to be on the ADD screen, as the user may wish to override the values.
Any ideas

J
Jane 8/8/2006

Hi,
if you add field with database default value to the ADD page use default value defined in the ASPRunner (on the Edit format dialog on the Formatting tab).

R
rgke author 8/8/2006

Only problem with this is that both fields have calculated values. One is a date field (set to current date), and the other is the output of a user defined function. As far as I can see, the only option in the edit screen you specify is a fixed default value.