Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Constraint Error Handling with ADO and SQL
Message
From
15/06/2001 13:07:06
 
 
To
15/06/2001 11:47:58
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00519999
Message ID:
00520035
Views:
19
>Hi,
>
>I hope someone can help me with a problem on ADO2.6 and SQL Server 7. I have a field Constraint on a SQL Table (field may not be empty). When I write a new record via ADO to the Table with empty fields, I can capture the error in the connection Error collection object OK. But I want to be able to find out which field caused the constraint error to fire. I thought I could examine the status property of each field in the recordset, but this property does not seem to be updated at this stage.
>
>I am going about the problem the right way. Is there some other way of approaching this problem. Any help would be greatly appreciated
>
>TIA
>
>Gerry McDermott

Did you check the Source, NativeError and SQLState properties of the error in the collection? I haven't checked it, but these properties have proved to be useful when the error description is not enough.
Previous
Reply
Map
View

Click here to load this message in the networking platform