Tuesday, October 28, 2014

making an int field in a table null

hi guys!


i have a windows form named form1 and a tblEmp with the following fields;


id int, Fname text, Lname text, Dob datetimepicker and age int


i also have on form1 two buttons Save and Retrieve and a textbox for searching by id #


the save button works fine, if i save a record with no age it saves and that's fine


but when i click the retrieve button;


the information come up which is great but age come up as 0;


in the table i made the age field (allow null)


can someone help me?


i tried age.text = "";


and it's still saving a 0 in the age field in the table.


i want the field to be blank when i click the retrieve button.


No comments:

Post a Comment