Last post Sep 19, 2006 10:32 AM by redtap
Aug 11, 2006 05:37 AM|redtap|LINK
In my database table I am setting up default values in my fields. For example in my field 'created' I am autogenerating the date and time using getdate() so whenever a row is inserted the datetime is automatically entered.
How is this mapped through using Blinq and Sqlmetal on the field mappings?At present it is carrying it through as a normal field. I would expect, although possibly incorrectly to find AutoGen=true?? Can someone explain the mapping process for autogenerated
fields (not Id columns)
Aug 14, 2006 09:45 PM|phuff|LINK
Sep 07, 2006 07:22 AM|redtap|LINK
getdate() is a method called in SQL from the default value field. So the field isn't an identity field but rather a normal field with a default value setup ( getdate() ). If no date is supplied when the record is inserted the current date and time is placed
in the field. Unfortunately Blinq on update supplies this field with a null value, unless I manually go into the autogenerated c# mapping code and set the field to be AutoGen=true; Although this works it stops me supplying a date, when in fact I might want
to supply a date in, I need the functionality to choose whether to insert a date or if not, have SQL insert the date for me. I hope this makes some sort of sense...
Sep 19, 2006 10:32 AM|redtap|LINK
Are you able to help?