<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'database'</title><link>http://forums.asp.net/search/SearchResults.aspx?q=&amp;tag=database&amp;orTags=0&amp;o=DateDescending</link><description>Search results matching tag 'database'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Conflict detection updates more than one row when I only want one!</title><link>http://forums.asp.net/thread/3572062.aspx</link><pubDate>Fri, 18 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3572062</guid><dc:creator>LHYWebDesigner</dc:creator><description>&lt;p&gt;&lt;pre class="c-sharp" name="code"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have a MySql database set with a primary key of:&amp;nbsp; cust_code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This primary key cannot be changed to auto increment, it must be assigned by and correlate to a separate program!&amp;nbsp; &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When I perform the update comand every row that has data in any field that is the same as the entry I am trying to update is updated instead of just the one that the customer code corresponds to.&amp;nbsp;&amp;nbsp; It seams as if it is updating any row that has duplication such as same last names.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I suspect it has something to do with the conflict detection, but I am not sure if it can be fixed.&amp;nbsp; When I eliminate the conflict detection for updating on every field but the primary key, it&amp;nbsp;updates (only the selected entry)&amp;nbsp;perfectly.&amp;nbsp; However, that really defeats the purpose of conflict detection.&amp;nbsp; I would like to be able to detect and overwrite conflicts only within the cust_code that is selected for editing.&amp;nbsp; I will never be able to avoid duplicate names, dollars, etc.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Besides the web.config file, the program is three files: UpdatePrefCustomers.aspx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prefcust_edit.aspx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prefcust_insert.aspx&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UpdatePrefCustomers.aspx is used to access the other two edit &amp;amp; insert pages.&amp;nbsp; prefcust_insert.aspx does not have any problems, it&amp;#39;s only prefcust_edit.aspx that is a problem.&amp;nbsp; &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Any help would be greatly appreciated.&amp;nbsp; &lt;img title="Laughing" alt="Laughing" src="http://forums.asp.net/tiny_mce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif" border="0" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The following is the access page, UpdatePrefCustomers.aspx:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;
&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; %&amp;gt;
&amp;lt;%@ Import Namespace=&amp;quot;MySql.Data.MySqlClient&amp;quot; %&amp;gt;
&amp;lt;%@ Import Namespace = &amp;quot;System.Data&amp;quot; %&amp;gt;
&amp;lt;%@ Import Namespace = &amp;quot;System.Data.Odbc&amp;quot; %&amp;gt;
&amp;lt;%@ Assembly Name=&amp;quot;System.Data&amp;quot; %&amp;gt;


&amp;lt;html dir=&amp;quot;ltr&amp;quot; xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;

&amp;lt;head id=&amp;quot;Head1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;


&amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;
&amp;lt;title&amp;gt;Preferred Customers at Lawrenceville Honda Yamaha!&amp;lt;/title&amp;gt;
&amp;lt;meta name=&amp;quot;robots&amp;quot; content=&amp;quot;noindex, nofollow&amp;quot; /&amp;gt; 
&amp;lt;meta http-equiv=&amp;quot;Cache-Control&amp;quot; content=&amp;quot;no-cache&amp;quot; /&amp;gt;
&amp;lt;meta http-equiv=&amp;quot;Pragma&amp;quot; content=&amp;quot;no-cache&amp;quot; /&amp;gt;

&amp;lt;script type=&amp;quot;text/javascript&amp;quot; language=&amp;quot;javascript&amp;quot;&amp;gt;
        function ConfirmOnDelete()
        {
          if (confirm(&amp;quot;Are you sure to delete this Preferred Customer?&amp;quot;)==true)
            return true;
          else
            return false;
        }
&amp;lt;/script&amp;gt;

&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;
.style1 {
	text-align: center;
	margin-left:auto; 
	margin-right:auto;
}
.style2 {
	text-align: center;
	font-size: 60pt;
	font-family: Mistral;
	color: #0000FF;
}

h1 { color: #003366; font-size: 24px; margin: 0px 0 0px 0;  line-height: 6px; }
.style3 {
	text-align: center;
	font-size: x-large;
}
.style4 {
	text-align: center;
	margin-top: 0;
	margin-bottom: 0;
}
.style5 {
	text-align: center;
	font-size: 60pt;
	font-family: Mistral;
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;


&amp;lt;body&amp;gt;
&amp;lt;p class=&amp;quot;style2&amp;quot;&amp;gt;Lawrenceville Honda Yamaha &amp;lt;/p&amp;gt;
&amp;lt;p class=&amp;quot;style5&amp;quot;&amp;gt;PREFERRED CUSTOMERS&amp;lt;/p&amp;gt;

&amp;lt;p class=&amp;quot;style3&amp;quot;&amp;gt;To sort, click on column header.&amp;lt;/p&amp;gt;
		
	&amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
	&amp;lt;asp:HyperLink ID=&amp;quot;HyperLink1&amp;quot; Text=&amp;quot;Add New Preferred Customer...&amp;quot; NavigateUrl=&amp;quot;prefcust_insert.aspx&amp;quot; runat=&amp;quot;server&amp;quot; /&amp;gt;
	&amp;lt;div id=&amp;quot;PreferredCustomersGridView&amp;quot; class=&amp;quot;style1&amp;quot;&amp;gt;
		&amp;lt;asp:Gridview ID=&amp;quot;grdPreferredCustomers&amp;quot; runat=&amp;quot;server&amp;quot; DataKeyNames=&amp;quot;cust_code&amp;quot; AllowSorting=&amp;quot;True&amp;quot; AllowPaging=&amp;quot;True&amp;quot; AutoGenerateColumns=&amp;quot;False&amp;quot; CellPadding=&amp;quot;1&amp;quot; CellSpacing=&amp;quot;2&amp;quot; DataSourceID=&amp;quot;srcPreferredCustomers&amp;quot;&amp;gt;
			&amp;lt;Columns&amp;gt;
			&amp;lt;asp:TemplateField&amp;gt;
				&amp;lt;ItemTemplate&amp;gt;
					&amp;lt;asp:LinkButton 
					ID=&amp;quot;LinkDelete&amp;quot; 
					runat=&amp;quot;server&amp;quot;
					Text=&amp;quot;Delete&amp;quot;
					CommandName=&amp;quot;delete&amp;quot;
					OnClientClick=&amp;quot;return ConfirmOnDelete();&amp;quot;&amp;gt;
					Delete
					&amp;lt;/asp:LinkButton&amp;gt;
				&amp;lt;/ItemTemplate&amp;gt;
			&amp;lt;/asp:TemplateField&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;cust_code&amp;quot;
				HeaderText=&amp;quot;Customer Code&amp;quot; 
				SortExpression=&amp;quot;cust_code&amp;quot;/&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;last_name&amp;quot;
				HeaderText=&amp;quot;Last Name&amp;quot; 
				SortExpression=&amp;quot;last_name&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;first_name&amp;quot;
				HeaderText=&amp;quot;First Name&amp;quot; 
				SortExpression=&amp;quot;first_name&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;join_date&amp;quot;
				HeaderText=&amp;quot;Join Date&amp;quot; 
				dataformatstring=&amp;quot;{0:D}&amp;quot;
				SortExpression=&amp;quot;join_date&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;amt_paid&amp;quot;
				HeaderText=&amp;quot;Amount Paid&amp;quot; 
				dataformatstring=&amp;quot;{0:n0}&amp;quot;
				SortExpression=&amp;quot;amt_paid&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;birthday_month&amp;quot;
				HeaderText=&amp;quot;Birthday Month&amp;quot; 
				SortExpression=&amp;quot;birthday_month&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;birthday_day&amp;quot;
				HeaderText=&amp;quot;Birthday Day&amp;quot; 
				SortExpression=&amp;quot;birthday_day&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;unit1_type&amp;quot;
				HeaderText=&amp;quot;Unit 1 Type&amp;quot; 
				SortExpression=&amp;quot;unit1_type&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;last_4_vin_unit1&amp;quot;
				HeaderText=&amp;quot;Last 4 Of 1st VIN&amp;quot; 
				SortExpression=&amp;quot;last_4_vin_unit1&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;unit2_type&amp;quot;
				HeaderText=&amp;quot;Unit 2 Type&amp;quot; 
				SortExpression=&amp;quot;unit2_type&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;last_4_vin_unit2&amp;quot;
				HeaderText=&amp;quot;Last 4 Of 2nd VIN&amp;quot; 
				SortExpression=&amp;quot;last_4_vin_unit2&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;email&amp;quot;
				HeaderText=&amp;quot;Email&amp;quot; 
				SortExpression=&amp;quot;email&amp;quot;/&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;notes&amp;quot;
				HeaderText=&amp;quot;Notes&amp;quot; 
				SortExpression=&amp;quot;notes&amp;quot;/&amp;gt;
			&amp;lt;asp:CheckBoxField
				DataField=&amp;quot;gift_1&amp;quot;
				HeaderText=&amp;quot;Recvd Gift 1&amp;quot; /&amp;gt;
			&amp;lt;asp:BoundField
				DataField=&amp;quot;gift_1_date&amp;quot;
				HeaderText=&amp;quot;Gift 1 Date&amp;quot; 
				dataformatstring=&amp;quot;{0:D}&amp;quot;
				SortExpression=&amp;quot;gift_1_date&amp;quot; /&amp;gt;
			&amp;lt;asp:hyperlinkfield 
			 	HeaderText=&amp;quot;Edit&amp;quot;
			 	Text=&amp;quot;Edit&amp;quot;
            	DataNavigateUrlFields=&amp;quot;cust_code&amp;quot;
            	DataNavigateUrlFormatString=&amp;quot;prefcust_edit.aspx?ID={0}&amp;quot; /&amp;gt;
            &amp;lt;/Columns&amp;gt;
			&amp;lt;FooterStyle BackColor=&amp;quot;#CCCCCC&amp;quot; /&amp;gt;
			&amp;lt;PagerStyle BackColor=&amp;quot;#999999&amp;quot; ForeColor=&amp;quot;Black&amp;quot; HorizontalAlign=&amp;quot;Center&amp;quot; /&amp;gt;
			&amp;lt;SelectedRowStyle BackColor=&amp;quot;#000099&amp;quot; Font-Bold=&amp;quot;True&amp;quot; ForeColor=&amp;quot;White&amp;quot; /&amp;gt;
			&amp;lt;HeaderStyle BackColor=&amp;quot;Black&amp;quot; Font-Bold=&amp;quot;True&amp;quot; ForeColor=&amp;quot;White&amp;quot; /&amp;gt;
			&amp;lt;AlternatingRowStyle BackColor=&amp;quot;#CCCCCC&amp;quot; /&amp;gt;

		&amp;lt;/asp:Gridview&amp;gt;
			
		&amp;lt;asp:SqlDataSource id=&amp;quot;srcPreferredCustomers&amp;quot; runat=&amp;quot;server&amp;quot; 
			ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:LHYPrefCustomerServer %&amp;gt;&amp;quot; 
			providerName=&amp;quot;MySql.Data.MySqlClient&amp;quot; 
			SelectCommand=&amp;quot;SELECT * FROM PCustomers&amp;quot; 
			DeleteCommand=&amp;quot;DELETE FROM PCustomers WHERE (cust_code=@cust_code)&amp;quot; &amp;gt;
			&amp;lt;DeleteParameters&amp;gt;
              &amp;lt;asp:Parameter Name=&amp;quot;cust_code&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
            &amp;lt;/DeleteParameters&amp;gt;
        &amp;lt;/asp:SqlDataSource&amp;gt;
	&amp;lt;/div&amp;gt;
	&amp;lt;/form&amp;gt;

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This next one is the problem child!&amp;nbsp; I cannot bold the code, so, lines 118 through 131&amp;nbsp;are the lines&amp;nbsp;that make&amp;nbsp;the page work when I remove them.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;&lt;pre class="c-sharp" name="code"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; %&amp;gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;
&amp;lt;script runat=&amp;quot;server&amp;quot;&amp;gt;

  protected void DetailsView1_ModeChanging(Object sender, System.Web.UI.WebControls.DetailsViewModeEventArgs e)
  {
    if (e.CancelingEdit == true)
    {
      Response.Redirect(&amp;quot;UpdatePrefCustomers.aspx&amp;quot;);
    }
  }
  protected void srcPrefCustomersEdit_Updated(object sender, SqlDataSourceStatusEventArgs e)
    {
        if (e.AffectedRows == 0)
            lblMessage.Text = &amp;quot;Could not update record because it has changed since you opened this page&amp;quot;;
        else Response.Redirect(&amp;quot;UpdatePrefCustomers.aspx&amp;quot;);
    }
&amp;lt;/script&amp;gt;
&amp;lt;html dir=&amp;quot;ltr&amp;quot; xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
&amp;lt;head id=&amp;quot;Head1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
&amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;
 &amp;lt;meta name=&amp;quot;robots&amp;quot; content=&amp;quot;noindex, nofollow&amp;quot; /&amp;gt;
   &amp;lt;title&amp;gt;Edit Preferred Customers&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
  &amp;lt;div&amp;gt;
    &amp;lt;asp:Label ID=&amp;quot;lblMessage&amp;quot; EnableViewState=&amp;quot;false&amp;quot; runat=&amp;quot;server&amp;quot; /&amp;gt;
    &amp;lt;asp:DetailsView DefaultMode=&amp;quot;Edit&amp;quot; AutoGenerateRows=&amp;quot;False&amp;quot; DataKeyNames=&amp;quot;cust_code&amp;quot;
      DataSourceID=&amp;quot;srcPrefCustomersEdit&amp;quot; HeaderText=&amp;quot;Edit Preferred Customer&amp;quot; ID=&amp;quot;DetailsView1&amp;quot; runat=&amp;quot;server&amp;quot;
      Width=&amp;quot;275px&amp;quot; OnModeChanging=&amp;quot;DetailsView1_ModeChanging&amp;quot; &amp;gt;
      &amp;lt;Fields&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;cust_code&amp;quot; HeaderText=&amp;quot;Customer Code&amp;quot; ReadOnly=&amp;quot;True&amp;quot; SortExpression=&amp;quot;cust_code&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;last_name&amp;quot; HeaderText=&amp;quot;Last Name&amp;quot; SortExpression=&amp;quot;last_name&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;first_name&amp;quot; HeaderText=&amp;quot;First Name&amp;quot; SortExpression=&amp;quot;first_name&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;join_date&amp;quot; HeaderText=&amp;quot;Join Date&amp;quot; DataFormatString=&amp;quot;{0:d}&amp;quot; SortExpression=&amp;quot;join_date&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;amt_paid&amp;quot; HeaderText=&amp;quot;Amount Paid&amp;quot; SortExpression=&amp;quot;amt_paid&amp;quot; /&amp;gt;
        &amp;lt;asp:TemplateField HeaderText=&amp;quot;Birthday Month&amp;quot;&amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;months&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:DropDownList
        		ID=&amp;quot;ddlMonths&amp;quot;
        		DataSourceID=&amp;quot;srcMonths&amp;quot;
        		DataTextField=&amp;quot;months&amp;quot;
        		DataValueField=&amp;quot;months&amp;quot;
        		SelectedValue=&amp;#39;&amp;lt;%# Bind(&amp;quot;birthday_month&amp;quot;) %&amp;gt;&amp;#39;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;
        &amp;lt;asp:TemplateField HeaderText=&amp;quot;Birthday Day&amp;quot;&amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;days&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:DropDownList
        		ID=&amp;quot;ddlDays&amp;quot;
        		DataSourceID=&amp;quot;srcDays&amp;quot;
        		DataTextField=&amp;quot;days&amp;quot;
        		DataValueField=&amp;quot;days&amp;quot;
        		SelectedValue=&amp;#39;&amp;lt;%# Bind(&amp;quot;birthday_day&amp;quot;) %&amp;gt;&amp;#39;
        		AppendDataBoundItems=&amp;quot;true&amp;quot;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;
        &amp;lt;asp:TemplateField HeaderText=&amp;quot;Unit 1 Type&amp;quot;&amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;type&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:DropDownList
        		ID=&amp;quot;ddlUnit1Type&amp;quot;
        		DataSourceID=&amp;quot;srcUnitTypes&amp;quot;
        		DataTextField=&amp;quot;type&amp;quot;
        		DataValueField=&amp;quot;type&amp;quot;
        		SelectedValue=&amp;#39;&amp;lt;%# Bind(&amp;quot;unit1_type&amp;quot;) %&amp;gt;&amp;#39;
        		AppendDataBoundItems=&amp;quot;true&amp;quot;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;
       	&amp;lt;asp:BoundField DataField=&amp;quot;last_4_vin_unit1&amp;quot; HeaderText=&amp;quot;Last 4 of Unit 1 VIN&amp;quot; SortExpression=&amp;quot;last_4_vin_unit1&amp;quot; /&amp;gt;
       	&amp;lt;asp:TemplateField HeaderText=&amp;quot;Unit 2 Type&amp;quot;&amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;unit2_type&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:DropDownList
        		ID=&amp;quot;ddlUnit2Type&amp;quot;
        		DataSourceID=&amp;quot;srcUnitTypes&amp;quot;
        		DataTextField=&amp;quot;type&amp;quot;
        		DataValueField=&amp;quot;type&amp;quot;
        		SelectedValue=&amp;#39;&amp;lt;%# Bind(&amp;quot;unit2_type&amp;quot;) %&amp;gt;&amp;#39;
        		AppendDataBoundItems=&amp;quot;true&amp;quot;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;last_4_vin_unit2&amp;quot; HeaderText=&amp;quot;Last 4 of Unit 2 VIN&amp;quot; SortExpression=&amp;quot;last_4_vin_unit2&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;email&amp;quot; HeaderText=&amp;quot;Email&amp;quot; SortExpression=&amp;quot;email&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;notes&amp;quot; HeaderText=&amp;quot;Notes&amp;quot; SortExpression=&amp;quot;notes&amp;quot; /&amp;gt;
        &amp;lt;asp:CheckBoxField DataField=&amp;quot;gift_1&amp;quot; HeaderText=&amp;quot;Recvd Gift 1&amp;quot; SortExpression=&amp;quot;gift_1&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;gift_1_date&amp;quot; HeaderText=&amp;quot;Date Gift 1 Recvd&amp;quot; DataFormatString=&amp;quot;{0:d}&amp;quot; SortExpression=&amp;quot;gift_1_date&amp;quot; /&amp;gt;
        &amp;lt;asp:CommandField ShowEditButton=&amp;quot;True&amp;quot; /&amp;gt;
      &amp;lt;/Fields&amp;gt;
      &amp;lt;FooterStyle BackColor=&amp;quot;#CCCCCC&amp;quot; /&amp;gt;
	  &amp;lt;PagerStyle BackColor=&amp;quot;#999999&amp;quot; ForeColor=&amp;quot;Black&amp;quot; HorizontalAlign=&amp;quot;Center&amp;quot; /&amp;gt;
	  &amp;lt;HeaderStyle BackColor=&amp;quot;Black&amp;quot; Font-Bold=&amp;quot;True&amp;quot; ForeColor=&amp;quot;White&amp;quot; /&amp;gt;
	  &amp;lt;AlternatingRowStyle BackColor=&amp;quot;#CCCCCC&amp;quot; /&amp;gt;
    &amp;lt;/asp:DetailsView&amp;gt;
    
    &amp;lt;asp:SqlDataSource id=&amp;quot;srcPrefCustomersEdit&amp;quot;  
    	ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:LHYPrefCustomerServer %&amp;gt;&amp;quot; 
    	providerName=&amp;quot;MySql.Data.MySqlClient&amp;quot; 
    	SelectCommand=&amp;quot;SELECT * FROM PCustomers WHERE cust_code=@cust_code&amp;quot; 
    	UpdateCommand=&amp;quot;UPDATE PCustomers 
        	SET last_name=@last_name, first_name=@first_name, join_date=@join_date, amt_paid=@amt_paid, birthday_month=@birthday_month, birthday_day=@birthday_day, unit1_type=@unit1_type, last_4_vin_unit1=@last_4_vin_unit1, unit2_type=@unit2_type, last_4_vin_unit2=@last_4_vin_unit2, email=@email, notes=@notes, gift_1=@gift_1, gift_1_date=@gift_1_date 
        	WHERE (@original_cust_code IS NULL AND cust_code IS NULL) OR cust_code=@original_cust_code 
        	AND (@original_last_name IS NULL AND last_name IS NULL) OR last_name=@original_last_name 
        	AND (@original_first_name IS NULL AND first_name IS NULL) OR first_name=@original_first_name
        	AND (@original_join_date IS NULL AND join_date IS NULL) OR join_date=@original_join_date        	
        	AND (@original_amt_paid IS NULL AND amt_paid IS NULL) OR amt_paid=@original_amt_paid 
        	AND (@original_birthday_month IS NULL AND birthday_month IS NULL) OR birthday_month=@original_birthday_month 
        	AND (@original_birthday_day IS NULL AND birthday_day IS NULL) OR birthday_day=@original_birthday_day 
        	AND (@original_unit1_type IS NULL AND unit1_type IS NULL) OR unit1_type=@original_unit1_type 
        	AND (@original_last_4_vin_unit1 IS NULL AND last_4_vin_unit1 IS NULL) OR last_4_vin_unit1=@original_last_4_vin_unit1 
        	AND (@original_unit2_type IS NULL AND unit2_type IS NULL) OR unit2_type=@original_unit2_type 
        	AND (@original_last_4_vin_unit2 IS NULL AND last_4_vin_unit2 IS NULL) OR last_4_vin_unit2=@original_last_4_vin_unit2
        	AND (@original_email IS NULL AND email IS NULL) OR email=@original_email
        	AND (@original_notes IS NULL AND notes IS NULL) OR notes=@original_notes
        	AND (@original_gift_1 IS NULL AND gift_1 IS NULL) OR gift_1=@original_gift_1
        	AND (@original_gift_1_date IS NULL AND gift_1_date IS NULL) OR gift_1_date=@original_gift_1_date&amp;quot;
        ConflictDetection=&amp;quot;CompareAllValues&amp;quot;  
        OldValuesParameterFormatString=&amp;quot;original_{0}&amp;quot;  
        runat=&amp;quot;server&amp;quot; OnUpdated=&amp;quot;srcPrefCustomersEdit_Updated&amp;quot; &amp;gt;
      &amp;lt;SelectParameters&amp;gt;
        &amp;lt;asp:QueryStringParameter Name=&amp;quot;cust_code&amp;quot; QueryStringField=&amp;quot;ID&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
      &amp;lt;/SelectParameters&amp;gt;
      &amp;lt;UpdateParameters&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;last_name&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;first_name&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;join_date&amp;quot; Type=&amp;quot;DateTime&amp;quot;/&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;amt_paid&amp;quot; Type=&amp;quot;Decimal&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;birthday_month&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;birthday_day&amp;quot; Type=&amp;quot;Int16&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;unit1_type&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;last_4_vin_unit1&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;unit2_type&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;last_4_vin_unit2&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;email&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;notes&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;gift_1&amp;quot; Type=&amp;quot;Boolean&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;gift_1_date&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;cust_code&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
      &amp;lt;/UpdateParameters&amp;gt;
    &amp;lt;/asp:SqlDataSource&amp;gt;
    
    &amp;lt;asp:SqlDataSource id=&amp;quot;srcMonths&amp;quot; runat=&amp;quot;server&amp;quot; 
    	ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:LHYPrefCustomerServer %&amp;gt;&amp;quot; 
    	providerName=&amp;quot;MySql.Data.MySqlClient&amp;quot; 
    	SelectCommand=&amp;quot;SELECT * FROM Months ORDER BY month_number ASC&amp;quot; /&amp;gt;
    &amp;lt;asp:SqlDataSource id=&amp;quot;srcDays&amp;quot; runat=&amp;quot;server&amp;quot; 
    	ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:LHYPrefCustomerServer %&amp;gt;&amp;quot; 
    	providerName=&amp;quot;MySql.Data.MySqlClient&amp;quot; 
    	SelectCommand=&amp;quot;SELECT * FROM Days ORDER BY days ASC&amp;quot; /&amp;gt;	
    &amp;lt;asp:SqlDataSource id=&amp;quot;srcUnitTypes&amp;quot; runat=&amp;quot;server&amp;quot; 
    	ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:LHYPrefCustomerServer %&amp;gt;&amp;quot; 
    	providerName=&amp;quot;MySql.Data.MySqlClient&amp;quot; 
    	SelectCommand=&amp;quot;SELECT * FROM UnitTypes ORDER BY type_id ASC&amp;quot; /&amp;gt; 
  &amp;lt;/div&amp;gt;
  &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The following is prefcust_insert.aspx which is not causing a problem:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; %&amp;gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;
&amp;lt;script runat=&amp;quot;server&amp;quot;&amp;gt;

  protected void DetailsView1_ItemInserted(Object sender, System.Web.UI.WebControls.DetailsViewInsertedEventArgs e)
  {
    Response.Redirect(&amp;quot;UpdatePrefCustomers.aspx&amp;quot;);
  }

  protected void DetailsView1_ModeChanging(Object sender, System.Web.UI.WebControls.DetailsViewModeEventArgs e)
  {
    if (e.CancelingEdit == true)
    {
      Response.Redirect(&amp;quot;UpdatePrefCustomers.aspx&amp;quot;);
    }
  }
&amp;lt;/script&amp;gt;
&amp;lt;html dir=&amp;quot;ltr&amp;quot; xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
&amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;
&amp;lt;meta name=&amp;quot;robots&amp;quot; content=&amp;quot;noindex, nofollow&amp;quot; /&amp;gt;
  &amp;lt;title&amp;gt;Insert Preferred Customers&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;asp:DetailsView DefaultMode=&amp;quot;Insert&amp;quot; AutoGenerateRows=&amp;quot;False&amp;quot; DataKeyNames=&amp;quot;cust_code&amp;quot;
      DataSourceID=&amp;quot;srcPrefCustomersInsert&amp;quot; HeaderText=&amp;quot;Insert Preferred Customer&amp;quot; ID=&amp;quot;DetailsView1&amp;quot; runat=&amp;quot;server&amp;quot;
      Width=&amp;quot;325px&amp;quot; OnItemInserted=&amp;quot;DetailsView1_ItemInserted&amp;quot; OnModeChanging=&amp;quot;DetailsView1_ModeChanging&amp;quot;&amp;gt;
      &amp;lt;Fields&amp;gt;
        &amp;lt;asp:TemplateField HeaderText=&amp;quot;Customer Code&amp;quot;&amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;cust_code&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:TextBox
        		ID=&amp;quot;txtCustCode&amp;quot;
        		Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;cust_code&amp;quot;) %&amp;gt;&amp;#39;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;asp:RequiredFieldValidator
        		ID=&amp;quot;reqCustCode&amp;quot; 
        		ControlToValidate=&amp;quot;txtCustCode&amp;quot; 
        		Text=&amp;quot;(Required)&amp;quot; 
        		Display=&amp;quot;Dynamic&amp;quot; 
        		SetFocusOnError=&amp;quot;true&amp;quot;
        		runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;asp:RegularExpressionValidator
        		id=&amp;quot;regCustCode2&amp;quot;
        		ControlToValidate=&amp;quot;txtCustCode&amp;quot;
        		Text=&amp;quot;The customer code you have entered is either to long or contains invalid characters.&amp;quot;
        		ValidationExpression=&amp;quot;^[0-9a-zA-Z]{1,4}$&amp;quot;
        		SetFocusOnError=&amp;quot;true&amp;quot;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;

        &amp;lt;asp:BoundField DataField=&amp;quot;last_name&amp;quot; HeaderText=&amp;quot;Last Name&amp;quot; SortExpression=&amp;quot;last_name&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;first_name&amp;quot; HeaderText=&amp;quot;First Name&amp;quot; SortExpression=&amp;quot;first_name&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;join_date&amp;quot; HeaderText=&amp;quot;Join Date&amp;quot; SortExpression=&amp;quot;join_date&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;amt_paid&amp;quot; HeaderText=&amp;quot;Amount Paid&amp;quot; SortExpression=&amp;quot;amt_paid&amp;quot; /&amp;gt;
        
        &amp;lt;asp:TemplateField HeaderText=&amp;quot;Birthday Month&amp;quot;&amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;months&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:DropDownList
        		ID=&amp;quot;ddlMonths&amp;quot;
        		DataSourceID=&amp;quot;srcMonths&amp;quot;
        		DataTextField=&amp;quot;months&amp;quot;
        		DataValueField=&amp;quot;months&amp;quot;
        		SelectedValue=&amp;#39;&amp;lt;%# Bind(&amp;quot;birthday_month&amp;quot;) %&amp;gt;&amp;#39;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;
        
        &amp;lt;asp:TemplateField HeaderText=&amp;quot;Birthday Day&amp;quot;&amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;days&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:DropDownList
        		ID=&amp;quot;ddlDays&amp;quot;
        		DataSourceID=&amp;quot;srcDays&amp;quot;
        		DataTextField=&amp;quot;days&amp;quot;
        		DataValueField=&amp;quot;days&amp;quot;
        		SelectedValue=&amp;#39;&amp;lt;%# Bind(&amp;quot;birthday_day&amp;quot;) %&amp;gt;&amp;#39;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;
        
        &amp;lt;asp:TemplateField HeaderText=&amp;quot;Unit 1 Type&amp;quot;&amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;type&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:DropDownList
        		ID=&amp;quot;ddlUnit1Type&amp;quot;
        		DataSourceID=&amp;quot;srcUnitTypes&amp;quot;
        		DataTextField=&amp;quot;type&amp;quot;
        		DataValueField=&amp;quot;type&amp;quot;
        		SelectedValue=&amp;#39;&amp;lt;%# Bind(&amp;quot;unit1_type&amp;quot;) %&amp;gt;&amp;#39;
        		AppendDataBoundItems=&amp;quot;true&amp;quot;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;

       	&amp;lt;asp:BoundField DataField=&amp;quot;last_4_vin_unit1&amp;quot; HeaderText=&amp;quot;Last 4 of Unit 1 VIN&amp;quot; SortExpression=&amp;quot;last_4_vin_unit1&amp;quot; /&amp;gt;
       	
       	&amp;lt;asp:TemplateField HeaderText=&amp;quot;Unit 2 Type&amp;quot;&amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;type&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:DropDownList
        		ID=&amp;quot;ddlUnit2Type&amp;quot;
        		DataSourceID=&amp;quot;srcUnitTypes&amp;quot;
        		DataTextField=&amp;quot;type&amp;quot;
        		DataValueField=&amp;quot;type&amp;quot;
        		SelectedValue=&amp;#39;&amp;lt;%# Bind(&amp;quot;unit2_type&amp;quot;) %&amp;gt;&amp;#39;
        		AppendDataBoundItems=&amp;quot;true&amp;quot;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;

       	&amp;lt;asp:BoundField DataField=&amp;quot;last_4_vin_unit2&amp;quot; HeaderText=&amp;quot;Last 4 of Unit 2 VIN&amp;quot; SortExpression=&amp;quot;last_4_vin_unit2&amp;quot; /&amp;gt;
        
        &amp;lt;asp:TemplateField HeaderText=&amp;quot;Email&amp;quot; SortExpression=&amp;quot;email&amp;quot; &amp;gt;
        	&amp;lt;ItemTemplate&amp;gt;
        	&amp;lt;%# Eval(&amp;quot;email&amp;quot;) %&amp;gt;
        	&amp;lt;/ItemTemplate&amp;gt;
        	&amp;lt;EditItemTemplate&amp;gt;
        	&amp;lt;asp:TextBox
        		ID=&amp;quot;txtEmail&amp;quot;
        		Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;email&amp;quot;) %&amp;gt;&amp;#39;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;asp:RegularExpressionValidator
        		id=&amp;quot;regEmail&amp;quot;
        		ControlToValidate=&amp;quot;txtEmail&amp;quot;
        		Text=&amp;quot;The email you have entered does not comply with the format:  xxxx@xxxx.xxx&amp;quot;
        		ValidationExpression=&amp;quot;^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$&amp;quot;
        		SetFocusOnError=&amp;quot;true&amp;quot;
        		Runat=&amp;quot;server&amp;quot; /&amp;gt;
        	&amp;lt;/EditItemTemplate&amp;gt;
        &amp;lt;/asp:TemplateField&amp;gt;

		&amp;lt;asp:BoundField DataField=&amp;quot;notes&amp;quot; HeaderText=&amp;quot;Notes&amp;quot; SortExpression=&amp;quot;notes&amp;quot; /&amp;gt;
        &amp;lt;asp:CheckBoxField DataField=&amp;quot;gift_1&amp;quot; HeaderText=&amp;quot;Recvd Gift 1&amp;quot; SortExpression=&amp;quot;gift_1&amp;quot; /&amp;gt;
        &amp;lt;asp:BoundField DataField=&amp;quot;gift_1_date&amp;quot; HeaderText=&amp;quot;Date Gift 1 Recvd&amp;quot; SortExpression=&amp;quot;gift_1_date&amp;quot; /&amp;gt;
        &amp;lt;asp:CommandField ShowInsertButton=&amp;quot;True&amp;quot; /&amp;gt;
        
      &amp;lt;/Fields&amp;gt;
      &amp;lt;FooterStyle BackColor=&amp;quot;#CCCCCC&amp;quot; /&amp;gt;
	  &amp;lt;PagerStyle BackColor=&amp;quot;#999999&amp;quot; ForeColor=&amp;quot;Black&amp;quot; HorizontalAlign=&amp;quot;Center&amp;quot; /&amp;gt;
	  &amp;lt;HeaderStyle BackColor=&amp;quot;Black&amp;quot; Font-Bold=&amp;quot;True&amp;quot; ForeColor=&amp;quot;White&amp;quot; /&amp;gt;
	  &amp;lt;AlternatingRowStyle BackColor=&amp;quot;#CCCCCC&amp;quot; /&amp;gt;
    &amp;lt;/asp:DetailsView&amp;gt;
      
    &amp;lt;asp:SqlDataSource id=&amp;quot;srcPrefCustomersInsert&amp;quot; runat=&amp;quot;server&amp;quot; 
    	ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:LHYPrefCustomerServer %&amp;gt;&amp;quot; 
    	providerName=&amp;quot;MySql.Data.MySqlClient&amp;quot; 
    	SelectCommand=&amp;quot;SELECT * FROM PCustomers WHERE cust_code=@cust_code&amp;quot; 
        InsertCommand=&amp;quot;INSERT INTO PCustomers (cust_code, last_name, first_name, join_date, amt_paid, birthday_month, birthday_day, unit1_type, last_4_vin_unit1, unit2_type, last_4_vin_unit2, email, notes, gift_1, gift_1_date) VALUES (@cust_code, @last_name, @first_name, @join_date, @amt_paid, @birthday_month, @birthday_day, @unit1_type, @last_4_vin_unit1, @unit2_type, @last_4_vin_unit2, @email, @notes, @gift_1, @gift_1_date)&amp;quot;&amp;gt;
      &amp;lt;SelectParameters&amp;gt;
        &amp;lt;asp:QueryStringParameter Name=&amp;quot;cust_code&amp;quot; QueryStringField=&amp;quot;cust_code&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
      &amp;lt;/SelectParameters&amp;gt;
      &amp;lt;InsertParameters&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;cust_code&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;last_name&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;first_name&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;join_date&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;amt_paid&amp;quot; Type=&amp;quot;Decimal&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;birthday_month&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;birthday_day&amp;quot; Type=&amp;quot;Int16&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;unit1_type&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;last_4_vin_unit1&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;unit2_type&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;last_4_vin_unit2&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;email&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;        
        &amp;lt;asp:Parameter Name=&amp;quot;notes&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;gift_1&amp;quot; Type=&amp;quot;Boolean&amp;quot; /&amp;gt;
        &amp;lt;asp:Parameter Name=&amp;quot;gift_1_date&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
      &amp;lt;/InsertParameters&amp;gt;
      &amp;lt;/asp:SqlDataSource&amp;gt;
    &amp;lt;asp:SqlDataSource id=&amp;quot;srcMonths&amp;quot; runat=&amp;quot;server&amp;quot; 
    	ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:LHYPrefCustomerServer %&amp;gt;&amp;quot; 
    	providerName=&amp;quot;MySql.Data.MySqlClient&amp;quot; 
    	SelectCommand=&amp;quot;SELECT * FROM Months ORDER BY month_number ASC&amp;quot; /&amp;gt;
    &amp;lt;asp:SqlDataSource id=&amp;quot;srcDays&amp;quot; runat=&amp;quot;server&amp;quot; 
    	ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:LHYPrefCustomerServer %&amp;gt;&amp;quot; 
    	providerName=&amp;quot;MySql.Data.MySqlClient&amp;quot; 
    	SelectCommand=&amp;quot;SELECT * FROM Days ORDER BY days ASC&amp;quot; /&amp;gt;
    &amp;lt;asp:SqlDataSource id=&amp;quot;srcUnitTypes&amp;quot; runat=&amp;quot;server&amp;quot; 
    	ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:LHYPrefCustomerServer %&amp;gt;&amp;quot; 
    	providerName=&amp;quot;MySql.Data.MySqlClient&amp;quot; 
    	SelectCommand=&amp;quot;SELECT * FROM UnitTypes ORDER BY type_id ASC&amp;quot; /&amp;gt;

  &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: error: 26 - Error Locating Server/Instance Specified</title><link>http://forums.asp.net/thread/3562901.aspx</link><pubDate>Sun, 13 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3562901</guid><dc:creator>shantanu.gupta</dc:creator><description>&lt;div&gt;
&lt;p&gt;Here is the resolution to error 26. Check this video to configure your error.&amp;nbsp;It was a real headache for me&amp;nbsp; for a long time. But this worked.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://techpint.com/programming/error-26-%E2%80%93-error-locating-serverinstance-specified-sql-server" rel="nofollow" target="_new"&gt;http://techpint.com/programming/error-26-%E2%80%93-error-locating-serverinstance-specified-sql-server&lt;/a&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;&lt;a href="http://techpint.com/programming/error-26-%E2%80%93-error-locating-serverinstance-specified-sql-server" rel="nofollow" target="_new"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>high loading time</title><link>http://forums.asp.net/thread/3553178.aspx</link><pubDate>Tue, 08 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3553178</guid><dc:creator>RajibRoy</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I made a search engine www.khonz.com. The size of MSSQL database is around 2 GB. It is working fine. But main problem it&amp;#39;s loading time is high for the first time and after that the speed is ok.&lt;/p&gt;&lt;p&gt;What will be the reason for this and how i can get rid from this.&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;Rajib Roy&lt;br /&gt;&lt;/p&gt;</description></item><item><title>SSAS IDataReader Issue...</title><link>http://forums.asp.net/thread/3554375.aspx</link><pubDate>Tue, 08 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3554375</guid><dc:creator>btrabon</dc:creator><description>&lt;p&gt;I&amp;#39;m pulling data from an OLAP cube (SQL Server Analysis Services 2008) and am seeing a wierd issue.&amp;nbsp; When I run the MDX query in Management Studio I get a value back in both fields being requested, but when the results come back in my&amp;nbsp;IDataReader object only the first field has a value;&amp;nbsp;the second field contains a null.&amp;nbsp; I thought it might be an issue with the way I was using the data reader so I tried a simple test where I used the AdomdDataAdapter object to call the same MDX query and fill the results into a simple DataSet, but still got the same issue.&amp;nbsp; The fields I&amp;#39;m trying to return are calculated members so I&amp;#39;m not sure if the problem is that I have two members defined at the top of my MDX or if something else is wrong.&amp;nbsp; My MDX looks like the following below:&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;pre class="sql" name="code"&gt;WITH 
	MEMBER [Measures].[Measure1] AS 
		&amp;#39;[Measures].[Calculated Field 1] + [Measures].[Calculated Field 2]&amp;#39; 
	MEMBER [Measures].[Measure2] AS 
		&amp;#39;[Measures].[Calculated Field 3] + [Measures].[Calculated Field 4]&amp;#39;
SELECT NON EMPTY
{
	[Measures].[Measure1],
	[Measures].[Measure2]
}
ON COLUMNS
FROM [MyCube]
WHERE
(
	[Dimension1].[Dimension1 Value].[Dimension1 Value].[123],
	[Dimension2].[Dimension2 Value].[Dimension2 Value].[456]
)
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;Then my code to load the data into the simple dataset looks like this:&lt;/p&gt;&lt;/p&gt;&lt;pre class="c-sharp:showcolumns" name="code"&gt;AdomdDataAdapter tempAdapter = new AdomdDataAdapter(comm);
DataSet tempDataSet = new DataSet();
tempAdapter.Fill(tempDataSet);&lt;/pre&gt;
&lt;p&gt;The comm variable is an AdomdCommand object with the MDX query loaded into it.&amp;nbsp; At this point if I look at the data loaded into the tempDataSet variable I will see that &amp;quot;Measure1&amp;quot; has a value&amp;nbsp;while &amp;quot;Measure2&amp;quot; does not.&amp;nbsp; Has anyone else ever run into an issue like this?&amp;nbsp; Any clues or hints would be greatly appreciated.&lt;br /&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Shopping Cart Gridview</title><link>http://forums.asp.net/thread/3547825.aspx</link><pubDate>Fri, 04 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3547825</guid><dc:creator>Yanayaya</dc:creator><description>&lt;p&gt;I found a solution to my shopping cart scenario thanks to&amp;nbsp;the kind peeps on here. However I have a quick question.&amp;nbsp; I have been working through an article about making a shopping cart. I have one that works fine but...Id like to change a specific detail about the setup.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would like the shopping cart to display all the items a users adds to their cart in a gridview and have that gridview show the total of those items.&amp;nbsp; The article I worked through does not do this, it shows the items in a list view without a total.&lt;/p&gt;
&lt;p&gt;Here is my front end code for my cart page.&lt;/p&gt;
&lt;p&gt;&amp;lt;%@ Page Language=&amp;quot;VB&amp;quot; AutoEventWireup=&amp;quot;false&amp;quot; CodeFile=&amp;quot;Cart.aspx.vb&amp;quot; &lt;/p&gt;
&lt;p&gt;Inherits=&amp;quot;Cart&amp;quot; %&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; &amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;title&amp;gt;Shopping Cart&amp;lt;/title&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/head&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;body&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Your shopping cart:&lt;/p&gt;
&lt;p&gt;&amp;lt;table style=&amp;quot;width: 500px&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;/p&gt;
&lt;p&gt;cellpadding=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;tr&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;td style=&amp;quot;width: 286px; height: 153px&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:GridView ID=&amp;quot;GridView1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/asp:GridView&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;td style=&amp;quot;height: 153px&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:Button ID=&amp;quot;btnRemove&amp;quot; runat=&amp;quot;server&amp;quot; &lt;/p&gt;
&lt;p&gt;Width=&amp;quot;100px&amp;quot; Text=&amp;quot;Remove Item&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:Button ID=&amp;quot;btnEmpty&amp;quot; runat=&amp;quot;server&amp;quot; &lt;/p&gt;
&lt;p&gt;Width=&amp;quot;100px&amp;quot; Text=&amp;quot;Empty Cart&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/tr&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/table&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;br /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:Button ID=&amp;quot;btnContinue&amp;quot; runat=&amp;quot;server&amp;quot;&lt;/p&gt;
&lt;p&gt;PostBackUrl=&amp;quot;~/Order.aspx&amp;quot; Text=&amp;quot;Continue Shopping&amp;quot; /&amp;gt;&amp;amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:Button ID=&amp;quot;btnCheckOut&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Check Out&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;br /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:Label ID=&amp;quot;lblMessage&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is the code behind&lt;/p&gt;
&lt;p&gt;Partial Class Cart&lt;/p&gt;
&lt;p&gt;Inherits System.Web.UI.Page&lt;/p&gt;
&lt;p&gt;Private Cart As SortedList&lt;/p&gt;
&lt;p&gt;Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;/p&gt;
&lt;p&gt;Cart = GetCart()&lt;/p&gt;
&lt;p&gt;If Not IsPostBack Then&lt;/p&gt;
&lt;p&gt;Me.DisplayCart()&lt;/p&gt;
&lt;p&gt;End If&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Private Function GetCart() As SortedList&lt;/p&gt;
&lt;p&gt;If Session(&amp;quot;Cart&amp;quot;) Is Nothing Then&lt;/p&gt;
&lt;p&gt;Session.Add(&amp;quot;Cart&amp;quot;, New SortedList)&lt;/p&gt;
&lt;p&gt;End If&lt;/p&gt;
&lt;p&gt;Return CType(Session(&amp;quot;Cart&amp;quot;), SortedList)&lt;/p&gt;
&lt;p&gt;End Function&lt;/p&gt;
&lt;p&gt;Private Sub DisplayCart()&lt;/p&gt;
&lt;p&gt;lstCart.Items.Clear()&lt;/p&gt;
&lt;p&gt;Dim CartItem As CartItem&lt;/p&gt;
&lt;p&gt;Dim CartEntry As DictionaryEntry&lt;/p&gt;
&lt;p&gt;For Each CartEntry In Cart&lt;/p&gt;
&lt;p&gt;CartItem = CType(CartEntry.Value, CartItem)&lt;/p&gt;
&lt;p&gt;lstCart.Items.Add(CartItem.Display)&lt;/p&gt;
&lt;p&gt;Next&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Protected Sub btnRemove_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRemove.Click&lt;/p&gt;
&lt;p&gt;If lstCart.SelectedIndex &amp;gt; -1 And Cart.Count &amp;gt; 0 Then&lt;/p&gt;
&lt;p&gt;Cart.RemoveAt(lstCart.SelectedIndex)&lt;/p&gt;
&lt;p&gt;Me.DisplayCart()&lt;/p&gt;
&lt;p&gt;End If&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Protected Sub btnEmpty_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEmpty.Click&lt;/p&gt;
&lt;p&gt;Cart.Clear()&lt;/p&gt;
&lt;p&gt;lstCart.Items.Clear()&lt;/p&gt;
&lt;p&gt;lblMessage.Text = &amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Protected Sub btnCheckOut_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCheckOut.Click&lt;/p&gt;
&lt;p&gt;lblMessage.Text = &amp;quot;Please Wait Checking out...&amp;quot;&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;End Class&lt;/p&gt;
&lt;p&gt;The trick is getting this code to use a gridview rather than this list view. Also to get the total as well.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any help appreciated&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Null Values</title><link>http://forums.asp.net/thread/3540631.aspx</link><pubDate>Mon, 30 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3540631</guid><dc:creator>STEVE.com</dc:creator><description>&lt;p&gt;&amp;nbsp;I have a real estate&amp;nbsp;website that uses a database.&amp;nbsp; In my database I have three fields: Garage, NumberOfCars, GarageType. Garage is a Yes/No field and NumberOfCars and GarageType are text fields.&amp;nbsp; On my web page that displays all the details about a house, I would like for the garage information to display like the following:&lt;/p&gt;
&lt;p&gt;Garage:&amp;nbsp;&amp;nbsp; &lt;em&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;&lt;em&gt;&amp;nbsp;2&lt;/em&gt;&lt;/strong&gt; Car &lt;em&gt;&lt;strong&gt;Attached&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The bold words are my databinding Labels.&amp;nbsp; I would like for &amp;quot;Yes&amp;quot; (or &amp;quot;No&amp;quot;) to always be displayed, but &amp;quot;2&amp;quot; and &amp;quot;Attached&amp;quot; to be displayed, unless the field in my database is null, then I would like for &amp;quot;Car&amp;quot; also to be omitted.&lt;/p&gt;
&lt;p&gt;Consider the following examples:&lt;/p&gt;
&lt;p&gt;If Garage is unchecked (No),&amp;nbsp;NumberOfCars has a value of 3, and GarageType is null, I would like my page display this...&lt;/p&gt;
&lt;p&gt;Garage:&amp;nbsp;&amp;nbsp; &lt;strong&gt;&lt;em&gt;No&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;em&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/em&gt; Car&lt;/p&gt;
&lt;p&gt;If Garage is checked (Yes), Number of Cars is null, and GarageType has a value of Detached, I would like my page to display this...&lt;/p&gt;
&lt;p&gt;Garage:&amp;nbsp;&amp;nbsp; &lt;strong&gt;&lt;em&gt;Yes&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;&lt;em&gt;Detached&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If Garage is checked (Yes), Number of Cars is null, and GarageType is null, I would like my page to display this...&lt;/p&gt;
&lt;p&gt;Garage:&amp;nbsp;&amp;nbsp; &lt;strong&gt;&lt;em&gt;Yes&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Steve&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Displaying Yes and No for Database Fields</title><link>http://forums.asp.net/thread/3538633.aspx</link><pubDate>Sun, 29 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3538633</guid><dc:creator>STEVE.com</dc:creator><description>&lt;p&gt;I have a database that has several Yes or No fields.&amp;nbsp; When I insert a Label control into my site and connect it to the Yes or No field it displays &amp;quot;True&amp;quot; for Yes and &amp;quot;False&amp;quot; for No.&amp;nbsp; I would like to display them with the text Yes or No.&amp;nbsp; I have tried the following:&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:Label id=&amp;quot;myLabel&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Eval(&amp;quot;myBooleanColumn&amp;quot;) == &amp;quot;true&amp;quot; ? &amp;quot;Yes&amp;quot; : &amp;quot;No&amp;quot; %&amp;gt;&amp;#39; /&amp;gt;&lt;/p&gt;
&lt;p&gt;but no matter if my database info is yes or no it will only display &amp;quot;Yes&amp;quot;&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Improved ORM Model Designer and New Monitoring Capabilities for the New Version of ADO.NET Data Providers</title><link>http://forums.asp.net/thread/3534373.aspx</link><pubDate>Thu, 26 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3534373</guid><dc:creator>Devart Software</dc:creator><description>&lt;p&gt;




&lt;/p&gt;
&lt;p style="margin-bottom:0cm;"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;&lt;span&gt;Devart
has recently announced the release of dotConnect products for Oracle,
MySQL, PostgreSQL,  and SQLite  ADO.NET providers that offer &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;span&gt;Entity
Framework support, LINQ to SQL support, and contain an &lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;&lt;span&gt;ORM
 model designer&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;span&gt;
for developing &lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;&lt;span&gt;LINQ
to SQL and EF models&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#1c7010"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;span&gt;based
on different database engines.&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;a href="http://www.devart.com/entitydeveloper/"&gt;Entity Developer 2.50&lt;/a&gt;, &lt;/font&gt;&lt;font color="#000000"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;a
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;span&gt;designer
for modeling and code generation for ADO.NET Entity Framework and
LINQ to SQL,&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; included
in Professional Edition of every dotConnect, &lt;/font&gt;&lt;font size="2"&gt;&lt;span&gt;
was greatly improved. Now Entity Developer allows to view and edit
data of tables, views, and model entities, create and execute Entity
SQL, LINQ to Entities, and LINQ to SQL queries against the model,
eliminating the need for additional applications and reducing time
for accessing these operations.  &lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Code generation for
models was completely redesigned. New T4 like template language
allows you to use the full power of C# or Visual Basic in the
templates, allowing virtually anything you may want for code
generation. Template editor now provides syntax highlighting, code
completion, and parameter information features. Syntax highlighting
allows you to easily distinguish text and code blocks.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;The model got two new
properties, affecting code generation: File Per Class and View
Generation. The File Per Class property allows placing each model
class to a separate file, and View Generation adds code for
pre-generating views for Entity Framework models. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;In LINQ to SQL,
dotConnect providers offer better performance and new
DbLinqDataSource class. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;span&gt;To ease the
database application development, integration with improved Devart
&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;dbMonitor&lt;/font&gt;&lt;font size="2"&gt;&lt;span&gt;
was added, allowing you to monitor interaction with database
remotely.  &lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;

&lt;p style="margin-bottom:0cm;"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;Please,
feel free to download, try and write any comments and suggestions
about our products!&lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-bottom:0cm;"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;b&gt;Pricing
and Availability&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-bottom:0cm;"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2"&gt;We
offer a free Express edition for each product from the dotConnect
product line.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-bottom:0cm;"&gt;&lt;font size="2"&gt;&lt;font face="Arial, sans-serif"&gt;The
Single licenses start from as little as $99.95, and you can always
choose the edition that matches your needs best. To learn more,
download trial and free editions, or order a license please visit
Devart site:&lt;br /&gt;&lt;/font&gt;&lt;a href="http://www.devart.com/dotconnect"&gt;www.devart.com/dotconnect/&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-bottom:0cm;"&gt;&lt;font size="2"&gt;&lt;b&gt;About Devart&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;font face="Arial"&gt;&lt;font size="2"&gt;&lt;span&gt;Devart&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;font face="Arial"&gt;&lt;font size="2"&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial"&gt;&lt;font size="2"&gt;&lt;span&gt;is a
software development company with 11 years of experience on the
software market and over 20 thousands of devoted users. &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;

&lt;p&gt;&lt;font face="Arial"&gt;&lt;font size="2"&gt;We specialize in
providing native connectivity solutions as well as comprehensive
development and management tools for the most popular databases,
including Oracle, SQL Server, MySQL, PostgreSQL, InterBase, Firebird,
and SQLite.&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="margin-bottom:0cm;"&gt;&lt;font face="Arial"&gt;&lt;font size="2"&gt;&lt;span&gt;For
additional information about Devart, visit &lt;a href="http://www.devart.com/"&gt;www.devart.com/company/&lt;/a&gt;.
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;</description></item><item><title>Dynamically generate a menu from database.</title><link>http://forums.asp.net/thread/3528892.aspx</link><pubDate>Mon, 23 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3528892</guid><dc:creator>SureshMali</dc:creator><description>&lt;p&gt;Hi Friends, &lt;/p&gt;
&lt;p&gt;I have a scenario where I need to generate a menu dynamically from the database. &lt;/p&gt;
&lt;p&gt;I have a table call &amp;quot;Categories&amp;quot; which has fields CatID and CatName. There is another table Products which has fields CatID, ProdID, ProdName. Now I want to generate a menu in such a way that the Products related to a particular category&amp;nbsp;are displayed under that category.&lt;/p&gt;
&lt;p&gt;Something Like this&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;CDs&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;miniCD&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;Standard CD&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;DVDs&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;miniDVD&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;Standard DVD 4.6GB&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;Dual Layer DVD 8.0 GB&lt;/p&gt;
&lt;p&gt;In the above case CD and DVD are the category and the other items are their Products.&lt;/p&gt;
&lt;p&gt;Would appreciate if anybody could direct me to some example code or give any idea how this can be achieved.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>GridView Devexpress control problem</title><link>http://forums.asp.net/thread/3517490.aspx</link><pubDate>Tue, 17 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3517490</guid><dc:creator>chchinmaya</dc:creator><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;I am using Devexpress controls in my project i am using Uploadcontrol for uploading images and adding that images in to my database and showing in devexpressdataview control&lt;/p&gt;
&lt;p&gt;My problem is after uploding images and inserting data to database and binding the updated records to devexpressdataview control but the dataset is not updating &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;can any one suggest me how to do this its very urgent requirement&lt;/p&gt;
&lt;p&gt;I am trying from 3 days but i unable to get the actual data.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks ALL..&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>