Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't update a MS SQL Server table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Can't update a MS SQL Server table
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01038123
Message ID:
01038123
Vues:
70
I'm getting the following error when attempting to update a SQL Server table:

Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'communityid', table 'lefiadb.dbo.commun'; column does not allow nulls. INSERT fails.

It's a small table. I get the cursor via a CursorAdapter class, delete all the records, perform a table update (with no error), then append data to the cursor from a local VFP table and then perform another table update, at which point I get the above error. In the Auto-Update tab of the CA, I have Send Updates and Auto-Update checked. In the list of fields, I have CommunityId set as the primary key, but don't have its update checkbox checked. Under "SQL WHERE clause includes" I have "Key and updateable fields" selected (it would seem that VFP always wants to update the key field since all these options have "key" in them).

I was getting this on another table and just changing the key field to -1 solved the problem (SQL Server is actually assigning these values on the back end). On this table using 0 for the key field does not help.

When "Auto-update" is check, does VFP respect the "Update" checkbox next to the field when building the list of fields to update? Does it include the key even if its update checkbox is unchecked?

Thanks,

Russell Campbell
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform