<?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 : Set Transaction error</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Set Transaction error</description>
  <pubDate>Wed, 15 Apr 2026 03:52:31 -700</pubDate>
  <lastBuildDate>Fri, 21 May 2010 16:22:46 -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=1837</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>Set Transaction error : Sadly, I don&amp;#039;t have quite...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1837&amp;PID=6990#6990</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 1837<br /><strong>Posted:</strong> 21-May-2010 at 4:22pm<br /><br /><P>Sadly, I don't have quite enough to go on. Can we simplify the problem?</P><DIV>Set aside the decision logic. Can you write the simplest possible SL application that (a) reads an OssMarginMonth, (b) modifies it, and (c) saves it? </DIV><DIV>&nbsp;</DIV><DIV>The application should do nothing else except launch, read, modify, and save.</DIV><DIV>&nbsp;</DIV><DIV>If you still get the error, we'll ask that you send us something we can investigate here. Unfortunately, we can't manage an entire application. We need to work with something a bit more focused. Accordingly, we'll ask that you</DIV><DIV>&nbsp;</DIV><DIV>1) Strip it down to a one table database with just OssMarginMonth</DIV><DIV>1a) Enter a few rows of sample data</DIV><DIV>2) Rebuild the sample (as just described) to talk to that toy database</DIV><DIV>3) Reproduce the error again</DIV><DIV>4) Zip it all up and send it to us</DIV><DIV>&nbsp;</DIV><DIV>We regret that you're having trouble. Hope we can get this resolved quickly.</DIV>]]>
   </description>
   <pubDate>Fri, 21 May 2010 16:22:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1837&amp;PID=6990#6990</guid>
  </item> 
  <item>
   <title>Set Transaction error : Hello,  I am getting an error...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1837&amp;PID=6985#6985</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=792" rel="nofollow">Neela</a><br /><strong>Subject:</strong> 1837<br /><strong>Posted:</strong> 21-May-2010 at 8:27am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>I am getting an error "SET TRANSACTION must be first statement of transaction." when I try to save an entity to the database. Below is the code. Please let me know in what circumstances this error would generate. </DIV><DIV>I appreciate your help. Thank you.</DIV><DIV>&nbsp;</DIV><DIV>public static void SetMonth(OssMarginEntityManager em, DateTime beginDate, DateTime endDate)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var item = (from o in em.OssMarginMonths where (o.OssMarginMonthId == 1) select o).FirstOrNullEntity();</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (item != null &amp;&amp; item.OssMarginMonthId&nbsp; &gt;&nbsp; 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item.BeginDate = beginDate;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item.EndDate = endDate;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var entities = new List&lt;Entity&gt; { item };<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; em.SaveChangesAsync(entities, SetMonthCallback, null);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR></DIV>]]>
   </description>
   <pubDate>Fri, 21 May 2010 08:27:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1837&amp;PID=6985#6985</guid>
  </item> 
 </channel>
</rss>