Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SupportClass.TransactionManager.manager.SetValue(pstmt, i++, null);
上述代码返回以下错误:
参数[3]:OleDbType 属性未初始化:OleDbType.Empty。
并且下面对应的JAVA代码是可行的,如何在C#中做同样的事情?
pstmt.setNull(i++, Types.DATE);
我不确定您的实现以及具体在做TransactionManager什么SetValue,但是对于 DateTime,您可以尝试将值设置为DBNull.Value而不是null.
TransactionManager
SetValue
DBNull.Value
null