I would do this in the UI, or even better in the BO layer (business objects layer). Something like: just before saving, if TheField = '' then set TheField to 'Unknown'. Also, i would add a constraint for not allowing empty values for TheField column. This ensures that the column will not contain empty values, even if the values are not inputed through your app that does the replacing of '' with 'Unknown'. And so the other app that doesn't accept empty values, will not break.
I think the user should be aware of the fact that empty values get replaced with 'Unknown', so that when the user wants to filter the rows, will know it has to say [TheField] = 'Unknown' and not [TheField] = '' which will return 0 rows.
In fact i think the best solution is to have an initial value of 'Unknown' for TheField for all new rows, and the user will be able to leave it as is, and save the row, or to enter another value for TheField. Also there should be a broken rule for not accepting empy values for [TheField].
i'm sorry for my english...
|