Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Failed to enable constraints
Message
De
15/03/2008 14:57:58
 
 
À
15/03/2008 14:45:37
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01302408
Message ID:
01302419
Vues:
6
At first glance I think possibly you're sending null data or bad data to a table that has a foreign key constraint applied to it. Just a swag, but do all tables have primary keys? I'm wondering if somehow you are creating a dup record or if the sequence the update is applied is different depending on where it is executed from (vfp, smss, et al).


>>Is it possible that you are trying to insert a null where a field does not allow nulls? Or perhaps you are trying to update the child before the parent (a foreign key issue)?
>>
>>Have you trie checking the datatable's hasErrors property in the dataset and then invoking the GetErrors method on each of the tables with errors. It should return a collection of datarows. Look at the rowError property on each. You could try setting .enableconstraints on the dataset to false before the fill so you can watch the errors.
>
>The command is a SQL select. Will what you juste wrote still applicable in such a situation?
>
>I also checked the data. The SQL Select is a very simple one. It includes one INNER JOIN. However, in that INNER JOIN, I can see in the table of the joined table that there are multiple records having the same INNER JOIN key. This is probably where it is not happy about it. However, this has worked well in VFP. It seems SQL Server detects something that VFP was not capable of. I verified with the client to know if it was normal to have the joined table to have multiple records on the same key.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform