I have created a DataTable "dTable" and am trying to add a column of type DataTime then add a row with the DateTime column set to Jan 1, 2012. I have added several other columns of various types then added a row with the columns filled in. However, whenever I try to add a row with the DateTime set to anything else but null, I get the error below.
dTable.Columns.Add("Birthday", System.Type.GetType("System.DateTime"))
Dim r As DataRow = dTable.NewRow
r("Birthday") = New DateTime(2012,1,1)
dTable. Rows.Add(r)
'Here I get the following error: "A first chance exception of type 'System.Data.EvaluateException' occurred in System.Data.dll"
dTable.Columns.Add("Birthday", System.Type.GetType("System.DateTime"))
Dim r As DataRow = dTable.NewRow
r("Birthday") = New DateTime(2012,1,1)
dTable. Rows.Add(r)
'Here I get the following error: "A first chance exception of type 'System.Data.EvaluateException' occurred in System.Data.dll"