G
Guest
How do I populate the DataColumn.DefaultValue property from SQLServer
i.e
I have a table in SQLServer. One of its columns has a default value. This column is populated with the default value when I insert a record and don't specifically set a value for the column
When I create a DataTable from the table's schema the corresponing DataColumn's DefaultValue property does not get set. So when I do DataTable.Rows.Add(NewDataRow) with a DataRow that does not specifically set a value for the column the column remains blank.
i.e
I have a table in SQLServer. One of its columns has a default value. This column is populated with the default value when I insert a record and don't specifically set a value for the column
When I create a DataTable from the table's schema the corresponing DataColumn's DefaultValue property does not get set. So when I do DataTable.Rows.Add(NewDataRow) with a DataRow that does not specifically set a value for the column the column remains blank.