>Hello,
>
>I am using MSSql 2008, and most of my fields do not use NULL. Now I got into trouble with the error
Cannot insert the value NULL into column 'DELT', table 'Framework.dbo.Globals'; column does not allow nulls. INSERT fails.
>The issue is that I build an insert statement that only includes the fields that are edited. In VFP I used to do the insert without problems, because not nullable fields would simply be blank after APPEND or INSERT.
>I would like to avoid using nullable fields everywhere, and I also would like to avoid specifying all fields in my insert statements. What is the best way to accomplish that?
For varchar fields you may want to specify default values (empty string). Same thing for other fields. In other words, you need to provide default values for all fields.
If it's not broken, fix it until it is.
My Blog