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,

CodePudding user response:

reference 1st floor of123 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 next to it as a null field 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, direct updates,



Hello, I think it is possible that the datagrid form controls delete data, because I want to form calculation, each other assignment again back to the table, is similar to EXCEL function, so I think use MSHFLEXGRID a bit better, but there is deleting data don't know how to solve this problem, yeah

CodePudding user response:

Write code articulated database table you object operation, is often said that the ADO object's methods and properties,
  • Related