Home > Software engineering > When editing Mshflexgrid, how to pass null values to the database?
When editing Mshflexgrid, how to pass null values to the database?
Time:09-20
I modify mshflexgrid directly with program implementation in the cell, and then update the data in the database directly, but if I delete the contents of a cell, how the null value is passed to the database, update or delete? The latter seems to be no good, if the former, how do you write statement?
CodePudding user response:
First of all, to set up the database table allows null values, second, if the field is numeric data types, you may need to delete the original records to add a new record, third, may require you to use the code to add a new record, empty fields to it as an empty value under not the assignment,
Null values, refers to the records in the field for assignment yet, once the assignment, this property is back to not go to,
If character, it is relatively simple, it is assigned to an empty string, although Null attribute cannot recover, but can't see the difference between user perception, in the case of character, directly update is ok,