帮助里的代码:
Select Case e.DataCol.name
Case "出生日期"
If e.DataRow.IsNull("出生日期") Then
e.DataRow("年龄") = Nothing
Else
Dim tp As TimeSpan = Date.today - CDate(e.DataRow("出生日期"))
e.DataRow("年龄") = Math.Round(tp.TotalDays / 365.2422,2)
End If
End Select
我执行命令后出现

此主题相关图片如下:出错.jpg

同样出现这个错误的还有:
If e.DataCol.Name = "身份证号" Then '是身份证号码发生变化吗?
If e.DataRow.IsNull("身份证号") Then '身份证号码是否为空
e.DataRow("出生日期") = Nothing '如果为空,则清除出生日期
Else
'否则从身份证号码列中提取出生日期
e.DataRow("出生日期") = ReadBirthday(e.DataRow("身份证号"))
End If
End If
请问我究竟哪里出错了呢。
谢谢!