Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot Insert Value NULL IN Column
Message
From
20/05/2018 01:50:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01660168
Message ID:
01660186
Views:
56
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform