到底该怎么写Insert语句来插入空值:System.DBNull类型的值不能转化为System.Nullable(of Integer)???
VB.NET + SQL Server 开发 WinForm程序。
其中,要写一句Insert语句。
UserTableAdapter.Insert(1, "张三", "男", "经理", DBNull.Value)
里面最后那个字段需要插入空值。Insert命令在该字段上的参数类型为System.Nullable(of Integer)。但是我写什么都不行,Null也不行(说不再支持这个常量了,请改用System.DBNull)。但改用System.DBNull.Value后,又说:System.DBNull类型的值不能转化为System.Nullable(of Integer)。
到底这个空值要怎么来表示呢??
谢谢!!