Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot Insert Value NULL IN Column
Message
De
20/05/2018 01:50:26
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01660168
Message ID:
01660186
Vues:
57
>Marc,
>
>Not sure what you mean. My insert for new record is contained in the framework. I just want to prevent the NULL value from being the default. If I use ' ' as the default, it still inserts a NULL in SQL Server???

In an insert statement you don't need to specify all the columns. So when SQL inserts a record into a table, it inserts the values passed. For fields which you didn't provide a value for, it will insert their default values; if no default values, then a null (literally means 'no value' in this case). Now if you have a field which is set as 'not null' and has no default value in SQL, what is the server to do? You are not sending a value, you have forbidden nulls, you haven't provided a default value. It errors out.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform