<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Update error</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Update error</description>
  <pubDate>Tue, 12 May 2026 20:42:45 -700</pubDate>
  <lastBuildDate>Thu, 26 Sep 2013 06:27:52 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=4378</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Update error : So dumb!There was a trigger on...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4378&amp;PID=16914#16914</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1221" rel="nofollow">Togas</a><br /><strong>Subject:</strong> 4378<br /><strong>Posted:</strong> 26-Sep-2013 at 6:27am<br /><br />So dumb!<div><br></div><div>There was a trigger on the table, it was using an asterisk.</div><div><br></div><div>&nbsp;</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Thu, 26 Sep 2013 06:27:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4378&amp;PID=16914#16914</guid>
  </item> 
  <item>
   <title>Update error : I have this code which updates...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4378&amp;PID=16913#16913</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1221" rel="nofollow">Togas</a><br /><strong>Subject:</strong> 4378<br /><strong>Posted:</strong> 26-Sep-2013 at 6:10am<br /><br />I have this code which updates my entity any time a field changes:<div><br></div><div><br></div><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div>&nbsp; &nbsp; Private Sub SaveOrderFromTracking(field As String)</div></div><div><div>&nbsp; &nbsp; &nbsp; field = field.Remove(0, 24)</div></div><div><div>&nbsp; &nbsp; &nbsp; Dim oldVal As String = CStr(SelectedOrder.EntityAspect.GetValue(field, EntityVersion.Current))</div></div><div><div>&nbsp; &nbsp; &nbsp; Dim newVal As String = CStr(SelectedOrder.EntityAspect.GetValue(field))</div></div><div><div>&nbsp; &nbsp; &nbsp; Dim OrderId As String = SelectedOrder.EntityAspect.GetValue("OrderId")</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; If oldVal = newVal Then Exit Sub</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; _mgr.SaveChangesAsync({SelectedOrder}, Nothing, Sub(args)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Not args.HasError Then</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim newMessage As Message = New Message(OrderId, MsgType.FieldChange, field, oldVal, newVal)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Messages.Insert(0, newMessage)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Else</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox.Show(args.Error.Message)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End Sub)</div></div><div><div>&nbsp; &nbsp; End Sub</div></div><div><br></div><div><br></div></blockquote>This was working but I added a new field to the table, now I get this error.<div><br></div><div>The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.</div><div><br></div><div>I ran a tracer on my SQL server and this is the TSQL being generated:</div><div><br></div><div><div>exec sp_executesql N'update &#091;dbo&#093;.&#091;Fastenal_Order&#093;</div><div>set &#091;Serial&#093; = @0</div><div>where (&#091;OrderId&#093; = @1)</div><div>',N'@0 varchar(50),@1 int',@0='test23',@1=1447</div></div><div><br></div><div><br></div><div>Any thoughts on what's going on?</div>]]>
   </description>
   <pubDate>Thu, 26 Sep 2013 06:10:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4378&amp;PID=16913#16913</guid>
  </item> 
 </channel>
</rss>