cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
I have a dataset with one table that may have several types of addresses in. Though I have set EnforceConstraints = false on the dataset in the dataset designer, and I have set EnforceCOnstraints = false on the instance of it dropped onto the form designer, I still encounter ConstraintExceptions (but only once) when working with the dataset.
I now wish to attempt a logical step of switching off the constraints I will not use in the context.
For example, when dealing with a Bank's address, the constraint
BANKS_ADDRESSESDataRelation will be used
But the CUSTOMERS_ADDRESSESDataRelation and the SUPPLIERS_ADDRESSESDataRelations will not be used.
I am wondering if these can be accessed via a property, such as:
Me.MyDataSetInstance.CUSTOMERS_ADDRESSESDataRelationInstance.Enabled = false
So far I have only found the un-typed way of:
Me.MyDataSetInstance.Constraints("CUSTOMERS_ADDRESSESDataRelation")...
Any ideas? Thanks much in advance!
Matt
I now wish to attempt a logical step of switching off the constraints I will not use in the context.
For example, when dealing with a Bank's address, the constraint
BANKS_ADDRESSESDataRelation will be used
But the CUSTOMERS_ADDRESSESDataRelation and the SUPPLIERS_ADDRESSESDataRelations will not be used.
I am wondering if these can be accessed via a property, such as:
Me.MyDataSetInstance.CUSTOMERS_ADDRESSESDataRelationInstance.Enabled = false
So far I have only found the un-typed way of:
Me.MyDataSetInstance.Constraints("CUSTOMERS_ADDRESSESDataRelation")...
Any ideas? Thanks much in advance!
Matt