How to handle default values in fields

Hello,


I have a MSSQL database. 

Some of the columns are mandatory and have auto-generated values (typically, the record's creation time which I want to come from the DB server but, in some case, other information like the calling user identity).

How can I properly handle that in Aurelius ? I have tried leaving the corresponding fields empty but Aurelius still fills the field with something (probably because it's mandatory).

How can I tell it that the column is no nullable but that it shouldn't supply a value if none is present?

You can use

TColumnProp.NoInsert

and

TColumnProp.NoUpdate

modifiers in Column mapping attribute: http://www.tmssoftware.biz/business/aurelius/doc/web/column.html

Thank you for your answer. What I'm looking for is slightly different: I want Aurelius to leave the DB default if I don't specify it (i.e. reproduce the natural behavior of the INSERT sql statement).


If I understand correctly, your suggestion would make it so that I cannot set or change the content of that column from the Aurelius object.

Hello, sorry, but then I don't understand what you want to achieve.

(damn form losing my answers all the time).


Thanks for your answer again.

I'm trying to have non-null column represented by a nullable member. If the member is assigned, the the value should be used to update the column. If it's not assigned, it should be ignored, in particular during insert (updates are fine)


If you map the column as not required and the value is null, Aurelius won't include the value in INSERT statements.