Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty fields go back as NULL?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Empty fields go back as NULL?
Divers
Thread ID:
00676856
Message ID:
00676856
Vues:
51
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform