Assign Null to textbox after deleting its content

  • Thread starter Thread starter Arend Jan
  • Start date Start date
A

Arend Jan

Hi,

I have a form in which the tableadapter gets its data from an access table.
Suppose I want to delete a clients phone number. I select the text in the
phone number field, and press delete. The field is now empty.

When I try to call the update method of the table adapter, I get an OleDb
exception telling me that the field can not be an empty string.

How do I get a field to become 'Null' if I delete its contents?
Not in the Validating event of each text box I hope?

Thx,
Arend Jan
 
If you are getting the exception from OLEDb, then most likely the issue is
on the database side. The field itself is most likely defined to not allow
nulls.
 
Back
Top