Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Constraint Error Handling with ADO and SQL
Message
From
18/06/2001 12:38:40
 
 
To
18/06/2001 12:07:14
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00519999
Message ID:
00520655
Views:
12
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.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform