J
johnb41
I have a simple form that has a bunch of textboxes that show data from
a dataset table.
When I "Add" a record with BindingManagerBase.AddNew(), all the
textboxes go blank, so I can add a new record.
If I leave a field totally blank, and then click the Update button
(which uses the DataAdapter.Update() command, I get an error saying:
"Field 'Orders.Email' cannot be a zero-length string"
Does .NET not allow zero-length strings?
I tried programmatically adding a space (" ") to the textbox like this:
If tbEmail.Text = "" Then
tbEmail.Text = " "
'also tried tbEmail.text = chr(32)
'also tried tbEmail.text = vbnull
End If
But after I get the error, this textbox still has no space in it.
I'm stumped. Can someone help?
Thanks!
John
a dataset table.
When I "Add" a record with BindingManagerBase.AddNew(), all the
textboxes go blank, so I can add a new record.
If I leave a field totally blank, and then click the Update button
(which uses the DataAdapter.Update() command, I get an error saying:
"Field 'Orders.Email' cannot be a zero-length string"
Does .NET not allow zero-length strings?
I tried programmatically adding a space (" ") to the textbox like this:
If tbEmail.Text = "" Then
tbEmail.Text = " "
'also tried tbEmail.text = chr(32)
'also tried tbEmail.text = vbnull
End If
But after I get the error, this textbox still has no space in it.
I'm stumped. Can someone help?
Thanks!
John