>Sergey,
>
> This whole idea started from the following. My colleague wrote a DeNull program. This programs opens table exclusively and if field allows NULLs, changes it to not allow them. It doesn't check, whether file contains NULLs or not. First of all, this process may be slow on the huge files. Secondly, all of the sudden I had VFP crash today several times when it was running this program. It worked just fine few days ago, so I had no idea, what may cause this crash...
I really wouldn't know if the crash may be coming from a field being marked as Not Null while having nulls in some records.
I'd rather prevent the situation than get into analysis-paralysis with it. In the DeNull.prg, before setting a field to NotNull:
locate for isnull(eval(cFld))
if found()
replace rest (cFld) with vDefaultValue for isnull(eval(cFld))
endif
Alter Table ...