Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing DataSets to .NET
Message
De
18/01/2005 13:20:03
 
 
À
18/01/2005 12:48:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00978183
Message ID:
00978202
Vues:
51
Bad data? Your .NET DataSet has some constraints set in the DataSet that your data is violating. Can't tell which constraint from the error message ... you either have null data where you're not suppposed to, a non-unique column or a bad foreign key. You'll have to examine both the data and the constraints on the .NET DataSet to see exactly where the problem lies.

The solution is to make sure you're not passing bad data. Or remove the constraints from the .NET DataSet, read in the data and tweak it, then add the constraints back. Or read the data into another DataSet without the constraints, tweak it, then copy it to the DataSet with the constraints.

~~Bonnie



>Hi All
>
>I'm having trouble passing DataSet objects to .NET from VFP8SP1
>
>Previously, I've followed Rick Strahl's excellent page on the subject. (http://www.west-wind.com/presentations/foxpronetwebservices/foxpronetwebservices.asp)
>
>However, this time I only need to pass data to .NET. I've been right round the houses, forgetting that .net only accepts VFP DiffGrams and also that only VFP supports Empty Date/DateTime fields. Anyway, after overcoming these factors, I've come across a new one
>
>When I pass any table, whether it is indexed or not, i get the following error
>
>Failed to enable contraints :
>
>One or More rows contain values violating non-null, unique, or foreign key constraint.
>
>I've done this kind of thing before, but I was getting data from SQL-Server Tables, amending the data as required and posting back the diffgram. I remember having to add indices to my tables then as the programmer i inherited from didn't use a single index in any tables. .NET moaned and i added the indeics and it sorted it out
>
>any ideas?
>
>Tim Hustler
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform