<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://rayharwood.com/Wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://rayharwood.com/Wiki/index.php?action=history&amp;feed=atom&amp;title=Relaxing_Enforced_Constraints</id>
		<title>Relaxing Enforced Constraints - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://rayharwood.com/Wiki/index.php?action=history&amp;feed=atom&amp;title=Relaxing_Enforced_Constraints"/>
		<link rel="alternate" type="text/html" href="http://rayharwood.com/Wiki/index.php?title=Relaxing_Enforced_Constraints&amp;action=history"/>
		<updated>2026-11-06T06:33:05Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.3</generator>

	<entry>
		<id>http://rayharwood.com/Wiki/index.php?title=Relaxing_Enforced_Constraints&amp;diff=16&amp;oldid=prev</id>
		<title>Rayharwood: Created page with &quot;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 &quot;relax constraints&quot; before filling ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://rayharwood.com/Wiki/index.php?title=Relaxing_Enforced_Constraints&amp;diff=16&amp;oldid=prev"/>
				<updated>2013-02-13T14:14:28Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;When you are getting data in a data table that does not conform to the table&amp;#039;s original (full) layout, such as distinct values, you need to &amp;quot;relax constraints&amp;quot; before filling ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;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 &amp;quot;relax constraints&amp;quot; before filling the data table.  &lt;br /&gt;
&lt;br /&gt;
This involves:&lt;br /&gt;
* Creating a new dataset '''not''' based on a table adapter&lt;br /&gt;
* Create your table-adapter based data table&lt;br /&gt;
* Add your data table to the data set&lt;br /&gt;
* Set EnforceConstraints ''on the data set'' to False&lt;br /&gt;
* Use the Fill approach to putting data in the data table (the Get approach does not work!)&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&lt;br /&gt;
            Dim Local_DS As New DataSet&lt;br /&gt;
            Dim System_DT As New IT_Security_DataSet.RBA_RuleItemsDataTable&lt;br /&gt;
            Local_DS.Tables.Add(System_DT)&lt;br /&gt;
            Local_DS.EnforceConstraints = False&lt;br /&gt;
            RuleItems_TA.Fill_UniqueRes_ForRuleGUID(System_DT, RBARule_Rec.RuleGUID)&lt;/div&gt;</summary>
		<author><name>Rayharwood</name></author>	</entry>

	</feed>