if (ds.Tables[0].Rows[0]["BirthDate"] != DBNull.Value)
--------------------
if (ds.Tables[0].Rows[0]["BirthDate"] != DBNull)
试试
--------------------
if (ds.Tables[0].Rows[0]["BirthDate"] != DBNull)
试试
调试欢乐多
修改为:
if (!ds.Tables[0].Rows[0].IsNull("BirthDate"))
两边类型不一致,不能比较