Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty fields go back as NULL?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Empty fields go back as NULL?
Miscellaneous
Thread ID:
00676856
Message ID:
00676856
Views:
52
I've created a table on SQL Server with several fields, specifying them not to allow null values. I have also created a basic form operating on a remote view of this table. My basic problem is when I add a new record to the view, fill in some of the fields and issue a TABLEUPDATE(), I get this error message...

"...Cannot insert the value NULL into column 'cstatus'...column does not allow nulls. INSERT fails."

So, how can I tell VFP not to send empty text fields back as NULL? I've tried doing the following even though I've never heard of doing this...

DBSetProp('V_WORKLOG.cstatus', 'Field', 'DataType', "C(1) NOT NULL")

but this does not help. So, do I have to cycle thru the empty fields and load them with at least a blank? Surely there is a better way to handle this. Funny, I've not seen any discussion of this in any C/S book or article.

Thanks for any help...

Del
Del
Next
Reply
Map
View

Click here to load this message in the networking platform