How To Set Date Field back to NULL

  • Thread starter Thread starter Michael D. Murphy
  • Start date Start date
M

Michael D. Murphy

Hi,
On my webform is a DOB text box. If the user wants to clear out the field,
how do I write a NULL back into the SQL Server Database field.
Thanks,
MDM
 
By using SqlCommand like "UPDATE Table SET field = null WHERE ID=something"
or by inserting a DBNull.Value into DataTable and use adapter.Update (table)
method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top