Home All Groups Group Topic Archive Search About
Author
6 Jan 2006 10:30 AM
gary
how can i set the defaultvalue of a datarow with type datatime to current
time ??

Author
6 Jan 2006 11:19 AM
Lucky
you can assigned value to DataColumn in the DataTable. ther is a
property i'm not sure right now which one it is but there is something
like "nullText" or "defaulutValue" property which you can used to set
the default value. which will replace null value when the row with null
value gets added into the table.thus u can pass null value to the item
filed while creating row and add it to the table and the default value
will be added to the row.
Author
7 Jan 2006 9:20 AM
Cor Ligthert [MVP]
Gary,

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatacolumnclassdefaultvaluetopic.asp

myDateTime.Defaultvalue = Now

(Be aware this is by creating the row)

I hope this helps,

Cor