Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server NULL setting
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01448763
Message ID:
01448766
Vues:
53
This message has been marked as a message which has helped to the initial question of the thread.
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform