Editing Relaxing Enforced Constraints
Jump to:
navigation
,
search
When you are getting data in a data table that does not conform to the table's original (full) layout, such as distinct values, you need to "relax constraints" before filling the data table. This involves: * Creating a new dataset '''not''' based on a table adapter * Create your table-adapter based data table * Add your data table to the data set * Set EnforceConstraints ''on the data set'' to False * Use the Fill approach to putting data in the data table (the Get approach does not work!) Example code: Dim Local_DS As New DataSet Dim System_DT As New IT_Security_DataSet.RBA_RuleItemsDataTable Local_DS.Tables.Add(System_DT) Local_DS.EnforceConstraints = False RuleItems_TA.Fill_UniqueRes_ForRuleGUID(System_DT, RBARule_Rec.RuleGUID)
|
Editing help
Personal tools
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
Actions
Search
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Toolbox
What links here
Related changes
Special pages