Saving a sql record when combo box is empty.
Posted on 2013-06-12
I have a small issue tracker vb .net app I created that uses sql server.
I have 2 tables, issues and related issues, joined on issueID in a 1 to many relationship.
My form has several fields, 2 of them are combo boxes which are Opened By and Assigned To
i created a dataset called Contacts, I then plop it onto each of the combo boxes, at this point everything is as expected. Scrolling through the records, each of the combo boxes is displaying the correct person.
The problem occurs when I need to blank out one of the combo boxes, Assigned To in this case. I then click save and close the form, now if I go back to the form to that record it still has the original person, not blank as expected. If I pick someone else instead of emptying the field and save it, then it does get saved.
Hopefully that's enough information to get an idea what my issue is.