Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constraint Error Handling with ADO and SQL
Message
De
18/06/2001 12:38:40
 
 
À
18/06/2001 12:07:14
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00519999
Message ID:
00520655
Vues:
13
The last constraint I tested this with was in a varchar field (length 1) only allowing the letter 'A' in to the table. I know the constraint is firing because the error -2147217873 is a constraint error. Thanks for the pointer to the cursortype. I have changed this to KeySet with no difference. Could I see the changes you made. This may sort the problem

Thanks Again

Gerry


>What is the constraint on the fields? I ask this because the error might not be related to field constraints. Check in what line the code is raising the error.
>
>Another thing I notice is that you should have a static or keyset cursor for batch updates, as explained in the help for the UpdateBatch method. The way you have your code you are opening a forward only cursor.
>
>I tested some of your code and after adding the appropriate cursor type setting before opening the RS the status field does return the corresponding constant.
>
>>>>In further inspection, the Status property does get populated in this circumstance. This property should return 11 (adFieldSchemaViolation) for the offending field object.
>>>>
>>>>Can you post more details as to how you are checking the status field?
>>>
>>>I mean status property.
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform