<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.claritycon.com/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>Peterson&amp;#39;s Ponderings - All Comments</title><link>http://blogs.claritycon.com/blogs/don_peterson/default.aspx</link><description>Technical findings, ideas, thoughts and news directly from me.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>re: Threading model issues when using VB 6 COM components in a .NET Web Service</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2008/01/17/3621.aspx#5381</link><pubDate>Thu, 22 May 2008 13:25:43 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:5381</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Any developers using Visual FoxPro COM DLL&amp;#39;s from a .Net web service will run into this same problem. &amp;nbsp;But thankfully, they can implement this same workaround.&lt;/p&gt;
&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=5381" width="1" height="1"&gt;</description></item><item><title>re: Threading model issues when using VB 6 COM components in a .NET Web Service</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2008/01/17/3621.aspx#3947</link><pubDate>Wed, 05 Mar 2008 22:00:40 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3947</guid><dc:creator>Ken Codit</dc:creator><description>&lt;p&gt;I encountered the same problem attempting to use VB6 COM components WCF. &amp;nbsp;The default threads created by WCF are multi-threaded apartments (MTA). &amp;nbsp;The legacy code I was attempting to expose was written in VB6 single threaded apartments (STA). &amp;nbsp;The following post by Scott Seely addressed the problem in a very nice way: &lt;a href="http://blogs.catalystss.com/blogs/scott_seely/archive/2007/09/27/203.aspx" target="_new" rel="nofollow"&gt;blogs.catalystss.com/.../203.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3947" width="1" height="1"&gt;</description></item><item><title>re: Threading model issues when using VB 6 COM components in a .NET Web Service</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2008/01/17/3621.aspx#3622</link><pubDate>Fri, 18 Jan 2008 09:59:45 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3622</guid><dc:creator>Kamran shahid</dc:creator><description>Nice article&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3622" width="1" height="1"&gt;</description></item><item><title>account  &amp;raquo; Blog Archive   &amp;raquo; Performing Joins using LINQ to Objects</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/11/04/3433.aspx#3468</link><pubDate>Mon, 12 Nov 2007 17:32:39 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3468</guid><dc:creator>account  » Blog Archive   » Performing Joins using LINQ to Objects</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://account.wpbloggers.com/account/?p=131"&gt;http://account.wpbloggers.com/account/?p=131&lt;/a&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3468" width="1" height="1"&gt;</description></item><item><title>oyxa  &amp;raquo; Blog Archive   &amp;raquo; Performing Joins using LINQ to Objects</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/11/04/3433.aspx#3436</link><pubDate>Mon, 05 Nov 2007 18:08:18 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3436</guid><dc:creator>oyxa  » Blog Archive   » Performing Joins using LINQ to Objects</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://oyxa.cn/?p=984"&gt;http://oyxa.cn/?p=984&lt;/a&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3436" width="1" height="1"&gt;</description></item><item><title>re: Customize the Default Web Service Help Page</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/07/16/3227.aspx#3233</link><pubDate>Thu, 19 Jul 2007 02:26:17 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3233</guid><dc:creator>Adam Muehlhausen</dc:creator><description>haha it would have been great to have this two weeks ago when I was working with debugging soap errors when communicating over a web service... I actually installed a packet sniffer. good stuff here though&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3233" width="1" height="1"&gt;</description></item><item><title>re: A generic deserialization method</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/04/15/3053.aspx#3056</link><pubDate>Tue, 17 Apr 2007 01:06:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3056</guid><dc:creator>dpeterson</dc:creator><description>Good point Bryan! &amp;nbsp;I wrote this method originally in .NET 2003 before generics and didn't even think about modifying it for generics when I ported it recently. &amp;nbsp;For those using .NET 2.0 or above I'd recommend the generics implementation Bryan listed.&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3056" width="1" height="1"&gt;</description></item><item><title>re: A generic deserialization method</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/04/15/3053.aspx#3055</link><pubDate>Mon, 16 Apr 2007 18:01:31 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3055</guid><dc:creator>Bryan Dougherty</dc:creator><description>One other thing you could do with .NET 2.0 is use generics to avoid the casting required by the callers:&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; string test = UtilityFunctions.SerializeToXML(cls);&lt;br&gt; &amp;nbsp; &amp;nbsp; SerializeMe cls2 = UtilityFunctions.DeserializeFromXML&amp;lt;SerializeMe&amp;gt;(test);&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public static objectType DeserializeFromXML&amp;lt;objectType&amp;gt;(string objToDeserialize)&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.Xml.Serialization.XmlSerializer mySerializer = null;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;XmlTextReader reader = null;&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Instantiate the Serializer with the type of object that is being deserialized. &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mySerializer = new System.Xml.Serialization.XmlSerializer(typeof(objectType));&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;reader = new XmlTextReader(objToDeserialize, XmlNodeType.Document, null);&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Serialize the object to xml &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;byte[] objData = System.Text.ASCIIEncoding.ASCII.GetBytes(objToDeserialize);&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;object result = mySerializer.Deserialize(reader);&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;reader.Close();&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (objectType)result;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch (Exception ex)&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw ex;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;finally&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (reader != null) { reader.Close(); }&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3055" width="1" height="1"&gt;</description></item><item><title>A generic deserialization method</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2006/07/08/1279.aspx#3054</link><pubDate>Sun, 15 Apr 2007 18:47:41 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3054</guid><dc:creator>Peterson's Ponderings</dc:creator><description>A while back I posted code on a method that would allow for serializing any object that was serializable...&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3054" width="1" height="1"&gt;</description></item><item><title>re: SQL Server 2005 Book Recommendation</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2006/12/29/2574.aspx#2890</link><pubDate>Fri, 09 Mar 2007 19:36:18 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:2890</guid><dc:creator>Abhang</dc:creator><description>Hi Don,&lt;br&gt;Thats how I got around that problem by modifying my code. Thanks for the information that file operations cant be included. Anyways Ill dig in this topic further if needed.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;Abhang&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=2890" width="1" height="1"&gt;</description></item><item><title>re: SQL Server 2005 Book Recommendation</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2006/12/29/2574.aspx#2886</link><pubDate>Fri, 09 Mar 2007 01:51:18 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:2886</guid><dc:creator>dpeterson</dc:creator><description>Abhang,&lt;br&gt;The short answer is yes, you can include a database transaction in a distributed transaction. &amp;nbsp;There are some properties off the connection objects to enlist your ADO.NET transaction into a larger distributed transaction (EnlistTransaction). &amp;nbsp;Keep in mind that if you are going to use distributed transactions your application will need to interact with the MS DTC (Distributed Transaction Coordinator) so it must be running on the machine with your application.&lt;br&gt;&lt;br&gt;I don't think a file create/write operation can be included in a distributed transaction. &amp;nbsp;Distributed transactions usually involve committing information on more than one database provider (i.e. two different SQL Servers) or a transactional service such as MQ or other .NET assemblies. &amp;nbsp;File operations though can be controlled easily enough in your normal code though using a regular database transaction. &amp;nbsp;The following pseudo code is an example:&lt;br&gt;&lt;br&gt;- Open a database transaction&lt;br&gt;try&lt;br&gt;- Execute unit of work in the database (i.e. call a stored proc) and use the database transaction with the connection&lt;br&gt;- Create the file&lt;br&gt;- write to the file&lt;br&gt;- Close the file&lt;br&gt;- Commit the database transaction&lt;br&gt;catch&lt;br&gt;- rollback the transaction&lt;br&gt;- delete the file&lt;br&gt;end&lt;br&gt;&lt;br&gt;This pseudo code has essentially given you a transaction. &amp;nbsp;If any errors occur during the database or file operations the catch event will rollback the transaction and delete the file as if the operations never occurred. &amp;nbsp;If the operations are successful then the database is commited after the file operations have been completed.&lt;br&gt;- Don&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=2886" width="1" height="1"&gt;</description></item><item><title>re: SQL Server 2005 Book Recommendation</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2006/12/29/2574.aspx#2882</link><pubDate>Tue, 06 Mar 2007 20:59:45 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:2882</guid><dc:creator>Abhang Rane</dc:creator><description>Hi Don,&lt;br&gt;I kinda struggled implementing distributed transactions where my front end was .NET and backend was sql server 2005. Now by distributed I do not mean just transactions related to database. I wanted to include some table operations and a file operation in a transaction. So if the table insert fails, the file operation must also be rollbacked. Is it possible in the System.Transacion namespce since it seems to have many new classes. I could put a table operation and message queue operation using System.transaction classes but not file operations. &lt;br&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=2882" width="1" height="1"&gt;</description></item><item><title>Taking the folders out of my operating system</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/02/13/2734.aspx#2782</link><pubDate>Sun, 18 Feb 2007 19:35:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:2782</guid><dc:creator>PM_blog</dc:creator><description>After reading a recent blog post on Lifehacker about using tagging and saved searches in Vista to simplify...&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=2782" width="1" height="1"&gt;</description></item><item><title>SqlServerForum.org  &amp;raquo; Blog Archive   &amp;raquo; SQL Server 2005 Integration Service Package - Configuring Connections</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2007/01/28/2639.aspx#2686</link><pubDate>Tue, 06 Feb 2007 23:37:48 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:2686</guid><dc:creator>SqlServerForum.org  » Blog Archive   » SQL Server 2005 Integration Service Package - Configuring Connections</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://sqlserverforum.org/archives/2007/01/28/sql-server-2005-integration-service-package-configuring-connections/"&gt;http://sqlserverforum.org/archives/2007/01/28/sql-server-2005-integration-service-package-configuring-connections/&lt;/a&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=2686" width="1" height="1"&gt;</description></item><item><title>re: C# null coalescing operator</title><link>http://blogs.claritycon.com/blogs/don_peterson/archive/2006/08/17/1503.aspx#1505</link><pubDate>Fri, 18 Aug 2006 14:00:18 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:1505</guid><dc:creator>Curtis</dc:creator><description>One more reason I'm getting sick of using VB.&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=1505" width="1" height="1"&gt;</description></item></channel></rss>