DbNull date

In my VB6 code I had:

If isdate(txtdate.text) then
     rs![DTE] = cdate(txtdate.text)
else
     rs![DTE] = vbNull
endif

After converting to VS2005, it appears I can no longer set a db field to DbNull. I get this error

''UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"'

rs.Fields("DTE").Value = System.DBNull.Value

 Any thoughts I went to the URL specified and it was no help to me.


Answer this question

DbNull date

  • Doug Owens

    correct!

  • jerMcguire

    it is also giving you the answer....

    rs.Fields("DTE").Value = System.DBNull.Value



  • Niclas

    OK. Thanks.
  • Rob Lorimer

    So, this is not an "error", but just a warning that it changed something
  • DbNull date