Updating field to dbnull

  • Thread starter Thread starter Tina
  • Start date Start date
T

Tina

I have instantiated an insertRow for a dataset. I now want to make the
GLCode DBNull.

I have tried:
insertRow.GLCode = Convert.dbnull
insertRow.GLCode = Convert.dbnull(insertRow.GLCode)

and several other things.

How is it done?
 
This should work, assuming your column is nullable:

insertRow.GLCode = System.DBNull.Value
 
Back
Top