Hello -
Im writing a tiered application for the first time in vb.net, and Im coming across a few sticking points.
In my database, I have setup relationships to preserve the integrity of the data.
I need to mimic these same relationships in the DataSet, so that I can guide the users actions and prevent them from violating the constraints in the database.
So, Ive implemeted some parent child DataRelations using the visual tool in the XML Designer, as per this article...
http://msdn.microsoft.com/library/d...skcreatingdatasetrelationswithxmldesigner.asp
Now I want exceptions to be thrown when I violate these constraints set in my dataset. I cant seem to be able to catch any violations. What exception should I be trying to catch? Ive used generic "Exception" and "ConstraintException" neither of them throw. Yet I know the integrity is working, because if I select a rule to be enforced when I violate a contraint - I see it take place [delete, update, whatever...]
So, the violations of the dataset arent getting caught, and the database is throwing exceptions - which is obviously no good to the end user.
I need to catch exceptions because I have to ask the user what he wants to do before I cascade some deletes, or whatever is going to happen based on this user input.
Any help much appreciated...
TIA.
Im writing a tiered application for the first time in vb.net, and Im coming across a few sticking points.
In my database, I have setup relationships to preserve the integrity of the data.
I need to mimic these same relationships in the DataSet, so that I can guide the users actions and prevent them from violating the constraints in the database.
So, Ive implemeted some parent child DataRelations using the visual tool in the XML Designer, as per this article...
http://msdn.microsoft.com/library/d...skcreatingdatasetrelationswithxmldesigner.asp
Now I want exceptions to be thrown when I violate these constraints set in my dataset. I cant seem to be able to catch any violations. What exception should I be trying to catch? Ive used generic "Exception" and "ConstraintException" neither of them throw. Yet I know the integrity is working, because if I select a rule to be enforced when I violate a contraint - I see it take place [delete, update, whatever...]
So, the violations of the dataset arent getting caught, and the database is throwing exceptions - which is obviously no good to the end user.
I need to catch exceptions because I have to ask the user what he wants to do before I cascade some deletes, or whatever is going to happen based on this user input.
Any help much appreciated...
TIA.