<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://aspadvice.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>BizTalk &amp; SSIS</title><link>http://aspadvice.com/blogs/biztalk/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 (Build: 60809.935)</generator><item><title>Moving one block over...</title><link>http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx</link><pubDate>Mon, 22 Oct 2007 14:57:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:35907</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/35907.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=35907</wfw:commentRss><description>This blog is moving to &lt;a href="http://aspadvice.com/blogs/stevenbarden" title="New Location"&gt;http://aspadvice.com/blogs/stevenbarden&lt;/a&gt;.
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx&amp;amp;;subject=Moving+one+block+over..." target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx&amp;amp;;title=Moving+one+block+over..." target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx&amp;amp;title=Moving+one+block+over..." target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx&amp;amp;;title=Moving+one+block+over..." target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx&amp;amp;;title=Moving+one+block+over...&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2007/10/22/Moving-one-block-over_2E002E002E00_.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=35907" width="1" height="1"&gt;</description></item><item><title>SSIS - Mapping Flat File Import Source And Sql 2005 Destination Column Translation Types</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx</link><pubDate>Sun, 24 Dec 2006 13:46:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:25762</guid><dc:creator>SteveB</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/25762.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=25762</wfw:commentRss><description>&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;This is my spin of an obscure Microsoft document that answers the need to translate SSIS import types (.NET mainly) with their Sql 2005 types on a 32 bit OS. The original Microsoft post is as &lt;a href="http://msdn2.microsoft.com/en-us/library/ms141036.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms141036.aspx&lt;/a&gt;. The following table is my reduction to the most commonly used data types. This implies that I will not use certain import types if they do not easily match common Sql 2005 types. This does not account for the fact that overflows can occur at the import level or the SQL level if data is larger than what is required.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table cellPadding="0" cellSpacing="0" style="margin:auto auto auto -1.15pt;width:293pt;border-collapse:collapse;" class="MsoNormalTable"&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="padding-right:5.4pt;padding-left:5.4pt;background:silver;padding-bottom:0in;width:102pt;padding-top:0in;height:13.5pt;border:silver 1pt solid;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;a name="RANGE!A1:B18"&gt;&lt;/a&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;Data Type&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:silver 1pt solid;padding-left:5.4pt;background:silver;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;SQL Server (SQLOLEDB; SQLNCLI)&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_I8&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;bigint&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_BYTES&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;binary, varbinary, timestamp&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_BOOL&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;bit&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_STR&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;char, varchar&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_DBTIMESTAMP&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;datetime, smalldatetime&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_NUMERIC&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;decimal, numeric&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_R8&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;float&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_IMAGE&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;image&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_I4&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;int&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_WSTR&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;nchar, nvarchar, sql_variant, xml&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_NTEXT&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;ntext&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_R4&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;real&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_I2&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;smallint&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_CY&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;smallmoney, money&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_TEXT&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;text&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_UI1&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;tinyint&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height:13.5pt;"&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:silver 1pt solid;width:102pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;DT_GUID&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:silver 1pt solid;padding-right:5.4pt;border-top:#d4d0c8;padding-left:5.4pt;background:white;padding-bottom:0in;border-left:#d4d0c8;width:191pt;padding-top:0in;border-bottom:silver 1pt solid;height:13.5pt;"&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size:9pt;font-family:Verdana;"&gt;uniqueidentifier&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;I hope this helps and plase feel free to post back and I will update this page.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx&amp;amp;;subject=SSIS+-+Mapping+Flat+File+Import+Source+And+Sql+2005+Destination+Column+Translation+Types" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx&amp;amp;;title=SSIS+-+Mapping+Flat+File+Import+Source+And+Sql+2005+Destination+Column+Translation+Types" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx&amp;amp;title=SSIS+-+Mapping+Flat+File+Import+Source+And+Sql+2005+Destination+Column+Translation+Types" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx&amp;amp;;title=SSIS+-+Mapping+Flat+File+Import+Source+And+Sql+2005+Destination+Column+Translation+Types" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx&amp;amp;;title=SSIS+-+Mapping+Flat+File+Import+Source+And+Sql+2005+Destination+Column+Translation+Types&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/24/SSIS-_2D00_-Mapping-Flat-File-Import-Source-And-Sql-2005-Destination-Column-Translation-Types.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=25762" width="1" height="1"&gt;</description></item><item><title>SSIS - Setting Variables To Non-Variable Objects (Flat File Path For Example)</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx</link><pubDate>Fri, 08 Dec 2006 14:42:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:25351</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/25351.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=25351</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;SSIS is a very powerful tool indeed but there is one aspect that confused me for a short time until I did some poking around as the need arose. I hope this helps you are much as it has helped me already.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;The example is reading a flat file to be imported in to a database. When you view (Edit) the properties for the Flat File Connection Manager you will see that, unlike the FTP connection Manager, the file path is fixed, rather it needs to be specified at design time. With the FTP Connection Manager you can assign source and destinations via selectable variables. *sigh, grumble grumble*.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;The way to get around this is to use the Expressions editor of the Flat File Connection Object. Start by r-mousing the Flat File Connection you started. Quick note, when doing you mappings at design time it is best to make the path bar point to an actual file soul so can line up your mappings. But when Done, make the path something like &amp;quot;C:\&amp;quot;. The you know that what you are about to do with a Variable and the Expression editor really works.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Start by declaring a package level string variable, called Path. Put in it the path you intend to use. Realize that this is the variable you can change in code during run time now. In my case I set it to C:\ to start and change it at run time, but for testing all we want to prove is that the expression / Variable over rides the fixed value set in the Flat File Connection Editor. Now r-mouse the Flat File Connection Editor and view the properties on the right. Select Expressions and click the button with the ellipsis that opens the Expression Editor for the Flat File Connection. You will see two columns. Select the Variable Connection String in the left column. On the right click the bottom with the ellipsis to open the Expression Builder, expand the variables on the left, and drag the variable you want (probably &amp;quot;@[User::Path]&amp;quot;) to the expression window. Click Eval Expression and you will see what you added as the value of the Variable in the Variables window.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;You are now done. The Expression Builders use of variables will over-ride that of the fixed Gui elements. And of course you can set these variables in code as needed.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Another good example of this can be found at &amp;quot;Dynamic Flat File Connections in SQL Server Integration Services&amp;quot; &lt;a href="http://www.mssqltips.com/tip.asp?tip=1084"&gt;http://www.mssqltips.com/tip.asp?tip=1084&lt;/a&gt;.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx&amp;amp;;subject=SSIS+-+Setting+Variables+To+Non-Variable+Objects+(Flat+File+Path+For+Example)" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx&amp;amp;;title=SSIS+-+Setting+Variables+To+Non-Variable+Objects+(Flat+File+Path+For+Example)" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx&amp;amp;title=SSIS+-+Setting+Variables+To+Non-Variable+Objects+(Flat+File+Path+For+Example)" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx&amp;amp;;title=SSIS+-+Setting+Variables+To+Non-Variable+Objects+(Flat+File+Path+For+Example)" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx&amp;amp;;title=SSIS+-+Setting+Variables+To+Non-Variable+Objects+(Flat+File+Path+For+Example)&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/08/SSIS-_2D00_-Setting-Variables-To-Non_2D00_Variable-Objects-_2800_Flat-File-Path-For-Example_2900_.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=25351" width="1" height="1"&gt;</description></item><item><title>Using Dts.Variables Vs Dts.VariableDispenser.LockForRead</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx</link><pubDate>Thu, 07 Dec 2006 18:41:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:25328</guid><dc:creator>SteveB</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/25328.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=25328</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;... and then we are humbled by the mistake we made... it&amp;#39;s just me? Well, anyway, I could not get Dts.Variables to work early on so I took the long route with Dts.VariableDispenser. In time this grew very tiring so after getting a few packages done I decided to go back and find out what I was doing wrong the first time around. And yes I was able to turn&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Dts.VariableDispenser.LockForRead(&lt;span style="color:maroon;"&gt;&amp;quot;User::ZipFiles&amp;quot;&lt;/span&gt;)&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;br /&gt;Dts.VariableDispenser.GetVariables(vars)&lt;br /&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; ZipFiles &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt; = &lt;span style="color:blue;"&gt;CType&lt;/span&gt;(vars(&lt;span style="color:maroon;"&gt;&amp;quot;User::ZipFiles&amp;quot;&lt;/span&gt;).Value, &lt;span style="color:blue;"&gt;String&lt;/span&gt;)&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Into...&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;color:blue;font-family:Arial;"&gt;Dim ZipFiles As String = CType(Dts.Variables(&lt;/span&gt;&lt;span style="font-size:10pt;color:maroon;font-family:Arial;"&gt;&amp;quot;User::ZipFiles&amp;quot;&lt;/span&gt;&lt;span style="font-size:10pt;color:blue;font-family:Arial;"&gt;).Value, String)&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;... and as others have stated, to do this you enter the &lt;strong&gt;&lt;span style="font-family:Arial;"&gt;Script Task Editor&lt;/span&gt;&lt;/strong&gt;, highlight &lt;strong&gt;&lt;span style="font-family:Arial;"&gt;Script&lt;/span&gt;&lt;/strong&gt; in the left window, and view the &lt;strong&gt;&lt;span style="font-family:Arial;"&gt;ReadOnlyVariables&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span style="font-family:Arial;"&gt;ReadWriteVariables&lt;/span&gt;&lt;/strong&gt;. Here you enter the variable in question that you want the Script Task to essentially auto-lock for you. It should now work, right? Wrong, not for me, and much frustration was realized. The end result is that I was doing it right but in my testing from the three line version to the one line version I had left the first line in place. The first line, &lt;strong&gt;&lt;span style="font-family:Arial;"&gt;Dts.VariableDispenser.LockForRead(&lt;span style="color:maroon;"&gt;&amp;quot;User::ZipFiles&amp;quot;&lt;/span&gt;)&lt;/span&gt;&lt;/strong&gt;, was still locking the variable, thus I was doing some odd double locking of the variable, resulting in a few bad words and not accomplishing what I wanted. After I commented out the code lock, joy was once again realized.&lt;/span&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx&amp;amp;;subject=Using+Dts.Variables+Vs+Dts.VariableDispenser.LockForRead" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx&amp;amp;;title=Using+Dts.Variables+Vs+Dts.VariableDispenser.LockForRead" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx&amp;amp;title=Using+Dts.Variables+Vs+Dts.VariableDispenser.LockForRead" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx&amp;amp;;title=Using+Dts.Variables+Vs+Dts.VariableDispenser.LockForRead" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx&amp;amp;;title=Using+Dts.Variables+Vs+Dts.VariableDispenser.LockForRead&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/07/Using-Dts.Variables-Vs-Dts.VariableDispenser.LockForRead.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=25328" width="1" height="1"&gt;</description></item><item><title>SSIS: Error using FTP Task - 0xc002f313 failed with error 0xc02090f3</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx</link><pubDate>Tue, 05 Dec 2006 22:32:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:25231</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/25231.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=25231</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;I was plugging variables in to an Ftp task and testing but I could not get my file to pull down. It looked like it should be good. It turns out of course that the ftp site was unix.&amp;nbsp;I knew the variable as /subdir/file.txt.gz but I could not get that file to download, much less the others I wanted to iterate. Next I tested locally using FileZilla FTP Server on a local windows box and it&amp;nbsp;worked perfectly, watched the logs all work file. It was not until I decided to NOT use my generated file location variable and to use a design time fixed Ftp location that it became clear that a Unix path was needed. What looked to me in IE as /subdir/file was really /export/home/subdir/subdir/file. Only after I specifically picked the file I wanted with the FTP Task did the real path show up. After this I plugged the new path in to my package level variable and it went smoothly.&lt;/span&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx&amp;amp;;subject=SSIS%3a+Error+using+FTP+Task+-+0xc002f313+failed+with+error+0xc02090f3" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx&amp;amp;;title=SSIS%3a+Error+using+FTP+Task+-+0xc002f313+failed+with+error+0xc02090f3" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx&amp;amp;title=SSIS%3a+Error+using+FTP+Task+-+0xc002f313+failed+with+error+0xc02090f3" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx&amp;amp;;title=SSIS%3a+Error+using+FTP+Task+-+0xc002f313+failed+with+error+0xc02090f3" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx&amp;amp;;title=SSIS%3a+Error+using+FTP+Task+-+0xc002f313+failed+with+error+0xc02090f3&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/05/SSIS_3A00_-Error-using-FTP-Task-_2D00_-0xc002f313-failed-with-error-0xc02090f3.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=25231" width="1" height="1"&gt;</description></item><item><title>Ftp And Script Tasks To Enumerating A Generic List Of Ftp Files</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx</link><pubDate>Fri, 01 Dec 2006 19:52:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:25135</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/25135.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=25135</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Ok, so it&amp;#39;s not BizTalk, and I have not written more about BizTalk lately due to work... my current project has no BizTalk. But along comes SQL 2005 SSIS... and if you have read between the lines, it is part BizTalk. And joy of joys, today (figuratively) I get to use it! &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;My current task has me rewriting a DTS package to download a collection of files via FTP. It seems simple enough after the getting started learning curve (which seems to be every day), so I start with a script task, add some code to concatenate multiple strings that represent file paths on an ftp location and pop them in to a Generic List. Did I mention that I tossed out half of my brain and one hand by having to do this in VB.NET, the SSIS scripting language of choice? I do so love VB.NET (dripping sarcasm). Now I make a package level variable of type object called File&lt;u&gt;s&lt;/u&gt;, notice the plural. Next&amp;nbsp;drop in a For Each Loop task and add a scoped variable to it of type string. Finally drop an Ftp task in to place inside the loop object that uses a remote path variable of type File. Now here comes the fun part... you&amp;#39;ll notice a mild disconnect in that the Ftp object cannot see the Files object, because it is a generic list, but as a variable it is of type Object, not string. Thus the File string and the enumerate. Set the ForEach to enum by variable. Select the User::Files variable as the variable of choice. Now in the For-Each go to variable mappings and set your variable to the Object. This way the Loop iterates and auto casts the Generic List Object to strings called by the same name. Next drop in a script task and take the value of File&lt;strong&gt;&lt;u&gt;&lt;span style="font-family:Arial;"&gt;s&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt; and put it in the File (String) object. Now you should be able to use the File (String) as the Ftp location variable... &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;I have included the outside script task code that builds the generic list / Object variable and the Loop-Contained Script Task that contains the break out code. All referenced variables are Package Level: &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;color:blue;font-family:Arial;"&gt;Public&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; Main()&lt;br /&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; FtpZipFileList &lt;span style="color:blue;"&gt;As&lt;/span&gt; List(&lt;span style="color:blue;"&gt;Of&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt;)&lt;br /&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; DateStamp &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;br /&gt;Dim&lt;/span&gt; vars &lt;span style="color:blue;"&gt;As&lt;/span&gt; Variables&lt;br /&gt;FtpZipFileList = &lt;span style="color:blue;"&gt;New&lt;/span&gt; System.Collections.Generic.List(&lt;span style="color:blue;"&gt;Of&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt;)&lt;br /&gt;DateStamp = &lt;span style="color:blue;"&gt;Date&lt;/span&gt;.Now.AddDays(-1).ToString(&lt;span style="color:maroon;"&gt;&amp;quot;yyyyMMdd&amp;quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style="color:green;"&gt;&amp;#39;build the files list&lt;br /&gt;&lt;/span&gt;FtpZipFileList.Add(&lt;span style="color:maroon;"&gt;&amp;quot;feed01_abc.&amp;quot;&lt;/span&gt; + DateStamp + &lt;span style="color:maroon;"&gt;&amp;quot;.txt.gz&amp;quot;&lt;/span&gt;)&lt;br /&gt;FtpZipFileList.Add(&lt;span style="color:maroon;"&gt;&amp;quot;feed02_abc.&amp;quot;&lt;/span&gt; + DateStamp + &lt;span style="color:maroon;"&gt;&amp;quot;.txt.gz&amp;quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style="color:green;"&gt;&amp;#39;FtpZipFileList.Add(&amp;quot;feed03_&lt;/span&gt;&lt;span style="color:maroon;"&gt;abc&lt;/span&gt;&lt;span style="color:green;"&gt;.&amp;quot; + DateStamp + &amp;quot;.txt.gz&amp;quot;)&lt;br /&gt;&amp;#39;FtpZipFileList.Add(&amp;quot;feed04_&lt;/span&gt;&lt;span style="color:maroon;"&gt;abc&lt;/span&gt;&lt;span style="color:green;"&gt;.&amp;quot; + DateStamp + &amp;quot;.txt.gz&amp;quot;)&lt;br /&gt;&amp;#39;FtpZipFileList.Add(&amp;quot;feed05_&lt;/span&gt;&lt;span style="color:maroon;"&gt;abc&lt;/span&gt;&lt;span style="color:green;"&gt;.&amp;quot; + DateStamp + &amp;quot;.txt.gz&amp;quot;)&lt;br /&gt;&amp;#39;FtpZipFileList.Add(&amp;quot;feed06_&lt;/span&gt;&lt;span style="color:maroon;"&gt;abc&lt;/span&gt;&lt;span style="color:green;"&gt;.&amp;quot; + DateStamp + &amp;quot;.txt.gz&amp;quot;)&lt;br /&gt;&amp;#39;FtpZipFileList.Add(&amp;quot;feed07_&lt;/span&gt;&lt;span style="color:maroon;"&gt;abc&lt;/span&gt;&lt;span style="color:green;"&gt;.&amp;quot; + DateStamp + &amp;quot;.txt.gz&amp;quot;)&lt;br /&gt;&amp;#39;FtpZipFileList.Add(&amp;quot;feed08_&lt;/span&gt;&lt;span style="color:maroon;"&gt;abc&lt;/span&gt;&lt;span style="color:green;"&gt;.&amp;quot; + DateStamp + &amp;quot;.txt.gz&amp;quot;)&lt;br /&gt;&amp;#39;setup and populate variables&lt;br /&gt;&lt;/span&gt;Dts.VariableDispenser.LockForRead(&lt;span style="color:maroon;"&gt;&amp;quot;User::ZipFiles&amp;quot;&lt;/span&gt;)&lt;br /&gt;Dts.VariableDispenser.GetVariables(vars)&lt;br /&gt;vars(&lt;span style="color:maroon;"&gt;&amp;quot;User::ZipFiles&amp;quot;&lt;/span&gt;).Value = FtpZipFileList&lt;br /&gt;vars.Unlock()&lt;br /&gt;Dts.TaskResult = Dts.Results.Success&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;color:blue;font-family:Arial;"&gt;Public&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; Main() &lt;br /&gt;&lt;span style="color:green;"&gt;&amp;#39;the purpose here is to take the iterated file name and make it a string that the ftp object can see&lt;br /&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; vars &lt;span style="color:blue;"&gt;As&lt;/span&gt; Variables&lt;br /&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; fileName &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;br /&gt;&lt;/span&gt;Dts.VariableDispenser.LockForRead(&lt;span style="color:maroon;"&gt;&amp;quot;User::ZipFiles&amp;quot;&lt;/span&gt;)&lt;br /&gt;Dts.VariableDispenser.LockForWrite(&lt;span style="color:maroon;"&gt;&amp;quot;User::ZipFile&amp;quot;&lt;/span&gt;)&lt;br /&gt;Dts.VariableDispenser.LockForRead(&lt;span style="color:maroon;"&gt;&amp;quot;User::FtpDir&amp;quot;&lt;/span&gt;)&lt;br /&gt;Dts.VariableDispenser.GetVariables(vars)&lt;br /&gt;fileName = vars(&lt;span style="color:maroon;"&gt;&amp;quot;User::FtpDir&amp;quot;&lt;/span&gt;).Value.ToString() + vars(&lt;span style="color:maroon;"&gt;&amp;quot;User::ZipFiles&amp;quot;&lt;/span&gt;).Value.ToString()&lt;br /&gt;vars(&lt;span style="color:maroon;"&gt;&amp;quot;User::ZipFile&amp;quot;&lt;/span&gt;).Value = fileName&lt;br /&gt;&lt;span style="color:green;"&gt;&amp;#39;MsgBox(vars(&amp;quot;User::ZipFile&amp;quot;).Value)&lt;br /&gt;&amp;#39;vars.Unlock()&lt;br /&gt;&lt;/span&gt;Dts.TaskResult = Dts.Results.Success&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;color:blue;font-family:Arial;"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx&amp;amp;;subject=Ftp+And+Script+Tasks+To+Enumerating+A+Generic+List+Of+Ftp+Files" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx&amp;amp;;title=Ftp+And+Script+Tasks+To+Enumerating+A+Generic+List+Of+Ftp+Files" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx&amp;amp;title=Ftp+And+Script+Tasks+To+Enumerating+A+Generic+List+Of+Ftp+Files" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx&amp;amp;;title=Ftp+And+Script+Tasks+To+Enumerating+A+Generic+List+Of+Ftp+Files" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx&amp;amp;;title=Ftp+And+Script+Tasks+To+Enumerating+A+Generic+List+Of+Ftp+Files&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/12/01/Enumerating-A-Generic-List.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=25135" width="1" height="1"&gt;</description></item><item><title>Command Line Date Time Stamped Automated Undeploy</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx</link><pubDate>Tue, 20 Jun 2006 17:02:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:18841</guid><dc:creator>SteveB</dc:creator><slash:comments>2</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/18841.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=18841</wfw:commentRss><description>&lt;FONT face=Georgia&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;There is really nothing overly special about this un-deploy script versus other examples you can find out there. But I have included one small feature that I like to use. When un-deploying a BizTalk process I want to export the Bindings, and I want to datetime stamp a copy of it. Included here is the shortest way I have found to datetime stamp my files without the use of perl, vbs or other external scripts. You will also notice it makes use of the StopOrch.vbs script as found in the BizTalk directory. I truly prefer to use a watered down version of Scott Colestock's BizTalk Deployment Framework, but not all cases allow for such.&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face=Tahoma color=#0000ff size=1&gt;:: -- start undeply script --&lt;BR&gt;SET btsserver=&amp;lt;BtSqlServer&amp;gt;&lt;BR&gt;SET btsdb=BizTalkMgmtDb&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma color=#800080 size=1&gt;&lt;STRONG&gt;set sep =-&lt;BR&gt;for /f "tokens=2,3,4 delims=/ " %a in ('date /t') do set zdate=%c-%b-%a&lt;BR&gt;for /f "tokens=1,2 delims=: " %a in ('time /t') do set ztime1=%a-%b&lt;BR&gt;for /f "tokens=1,2 delims= " %a in ('time /t') do set zampm=%b&lt;BR&gt;set now=%zdate%-%ztime1%-%zampm%&lt;BR&gt;:: echo %now%&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma color=#0000ff size=1&gt;btsdeploy export server=%btsserver% database=%btsdb% name="BizTalk.Orchestrations" version="1.0.0.0" culture="neutral" PublicKeyToken="5e1dc6d2ce0ef2c3" binding="BizTalk.Orchestrations.&lt;STRONG&gt;&lt;FONT color=#800080&gt;%now%&lt;/FONT&gt;&lt;/STRONG&gt;.xml"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma color=#0000ff size=1&gt;btsdeploy export server=%btsserver% database=%btsdb% name="BizTalk.Orchestrations" version="1.0.0.0" culture="neutral" PublicKeyToken="5e1dc6d2ce0ef2c3" binding="BizTalk.Orchestrations.xml"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma color=#0000ff size=1&gt;@CScript /NoLogo StopOrch.vbs BizTalk.Orchestrations.Process BizTalk.Orchestrations Unenlist &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma color=#0000ff size=1&gt;btsdeploy remove server=%btsserver% database=%btsdb% name="BizTalk.Orchestrations" version="1.0.0.0" culture="neutral" PublicKeyToken="5e1dc6d2ce0ef2c3" uninstall=true&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma color=#0000ff size=1&gt;btsdeploy remove server=%btsserver% database=%btsdb% name="BizTalk.Transforms" version="1.0.0.0" culture="neutral" PublicKeyToken="5e1dc6d2ce0ef2c3" uninstall=true&lt;BR&gt;btsdeploy remove server=%btsserver% database=%btsdb% name="BizTalk.Schemas" version="1.0.0.0" culture="neutral" PublicKeyToken="5e1dc6d2ce0ef2c3" uninstall=true&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma color=#0000ff size=1&gt;net stop "BizTalk Service BizTalk Group : &amp;lt;Host&amp;gt;"&lt;BR&gt;net start "BizTalk Service BizTalk Group : &amp;lt;Host&amp;gt;"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma color=#0000ff size=1&gt;pause &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=1&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx&amp;amp;;subject=Command+Line+Date+Time+Stamped+Automated+Undeploy" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx&amp;amp;;title=Command+Line+Date+Time+Stamped+Automated+Undeploy" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx&amp;amp;title=Command+Line+Date+Time+Stamped+Automated+Undeploy" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx&amp;amp;;title=Command+Line+Date+Time+Stamped+Automated+Undeploy" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx&amp;amp;;title=Command+Line+Date+Time+Stamped+Automated+Undeploy&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/20/18841.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18841" width="1" height="1"&gt;</description></item><item><title>Another Way To Share A BizTalk / Non-BizTalk Schema - Embedded Resoources</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx</link><pubDate>Tue, 13 Jun 2006 00:43:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:18624</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/18624.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=18624</wfw:commentRss><description>&lt;P&gt;&lt;SPAN&gt;In a previous post I pointed out one way that worked for me in the goal of sharing a schema between a BizTalk and C#&amp;nbsp;project(s). This basically entailed running xsd.exe against the a Schema in a Schema assembly and linking to that .cs class file from the other project. &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Scott's work is far more elegant, and complicated in its goals and functionality. If you build full libraries in to your BizTalkProject.Componenets project, this solution may be for you (and me in upcoming projects).&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;A href="http://www.traceofthought.net/PermaLink,guid,c1164c59-72e2-49e2-be7a-47e4e8dc46d4.aspx"&gt;http://www.traceofthought.net/PermaLink,guid,c1164c59-72e2-49e2-be7a-47e4e8dc46d4.aspx&lt;/A&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx&amp;amp;;subject=Another+Way+To+Share+A+BizTalk+%2f+Non-BizTalk+Schema+-+Embedded+Resoources" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx&amp;amp;;title=Another+Way+To+Share+A+BizTalk+%2f+Non-BizTalk+Schema+-+Embedded+Resoources" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx&amp;amp;title=Another+Way+To+Share+A+BizTalk+%2f+Non-BizTalk+Schema+-+Embedded+Resoources" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx&amp;amp;;title=Another+Way+To+Share+A+BizTalk+%2f+Non-BizTalk+Schema+-+Embedded+Resoources" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx&amp;amp;;title=Another+Way+To+Share+A+BizTalk+%2f+Non-BizTalk+Schema+-+Embedded+Resoources&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/12/18624.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18624" width="1" height="1"&gt;</description></item><item><title>Binary Conversion (FileStream to MemoryStream) For Tar / Zip to Custom Pipeline Message</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx</link><pubDate>Fri, 09 Jun 2006 11:41:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:18540</guid><dc:creator>SteveB</dc:creator><slash:comments>5</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/18540.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=18540</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The requirement is to input an Xml trigger file (see previous posts on this) and output a Zip or Tar file. Later requirements could entail sending pictures (binary). The inbound trigger options are used to determine the outbound port used, which may send the output to file, ftp, or sftp. My employer uses /nsoftware adapters. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Although this project started by using the ICSharpCode.SharpZipLib to produce Tar / Zip streams, there were just various issues. We switched to using /nsoftware’s .Net Zip Library, but then Tar streams required intermediate temp files (Note: if tarring a Stream using these components can be done, it simply did not produce itself as an easy answer in the compressed time I had). So when I tar’d files, read the FileStream I needed to modify it some so the pipeline message body worked right. Although this version reads and sends Tar and Zip files, I may want to send a picture of other binary format. This method has allowed me to read any file I want and replace the pipeline message body quite easily.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;FileStream fs = &lt;SPAN&gt;new&lt;/SPAN&gt; FileStream(&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;tarFileName,&amp;nbsp;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;FileMode.Open,&amp;nbsp;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;FileAccess.Read);&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;int&lt;/SPAN&gt;&lt;SPAN&gt; length = Convert.ToInt32(fs.Length);&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;MemoryStream ms = &lt;SPAN&gt;new&lt;/SPAN&gt; MemoryStream(length);&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;BinaryReader br = &lt;SPAN&gt;new&lt;/SPAN&gt; BinaryReader(fs);&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;byte&lt;/SPAN&gt;&lt;SPAN&gt;[] byteBuffer = br.ReadBytes(length);&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;ms.Write(byteBuffer,0,length);&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;ms.Position = 0;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;inmsg.BodyPart.Data = ms ;&lt;BR&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx&amp;amp;;subject=Binary+Conversion+(FileStream+to+MemoryStream)+For+Tar+%2f+Zip+to+Custom+Pipeline+Message" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx&amp;amp;;title=Binary+Conversion+(FileStream+to+MemoryStream)+For+Tar+%2f+Zip+to+Custom+Pipeline+Message" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx&amp;amp;title=Binary+Conversion+(FileStream+to+MemoryStream)+For+Tar+%2f+Zip+to+Custom+Pipeline+Message" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx&amp;amp;;title=Binary+Conversion+(FileStream+to+MemoryStream)+For+Tar+%2f+Zip+to+Custom+Pipeline+Message" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx&amp;amp;;title=Binary+Conversion+(FileStream+to+MemoryStream)+For+Tar+%2f+Zip+to+Custom+Pipeline+Message&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/09/18540.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18540" width="1" height="1"&gt;</description></item><item><title>Sharing A Trigger Schema Between BizTalk And A Trigger.exe</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx</link><pubDate>Wed, 07 Jun 2006 16:52:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:18497</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/18497.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=18497</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-family:Georgia;"&gt;Ok, I really like this trick. Oh the wonders of simple inheritance. What I wanted in the outset was to have my trigger project share the BizTalk schemas by way of the Assembly project. You know, share the code. I am not going to say that this cannot be done, but I have it on impeccable authority that it is not Microsoft supported.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Georgia;"&gt;So&amp;nbsp;I dropped to a command line and running xsd.exe on my Trigger Schema in the BizTalk Trigger Assembly project to produce Trigger.cs (xsd /c TriggerSchema.xsd). Now I have a class that I serialize to string and file. But here is the hitch... I don&amp;rsquo;t want to EVER manually modify the Trigger.cs file that is produced by the xsd.exe. Yet I do want to add functionality, such as Trigger.ToString(). The Trigger.cs file is easily wrapped and inherited, then you can use the TriggerWrapper.cs. Now I can use the serializable class representation of my BizTalk Schema, add my own functionality, and only need to run the xsd.exe from time to time to update the base class.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Georgia;"&gt;I have included the wrapper below, including the link to a Microsoft KB you may find you need if you run in to certain errors.&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Georgia;"&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnxmlnet/html/trblshtxsd.asp?frame=true"&gt;http://msdn.microsoft.com/library/en-us/dnxmlnet/html/trblshtxsd.asp?frame=true&lt;/a&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:11pt;color:blue;font-family:Tahoma;"&gt;using&lt;/span&gt;&lt;span style="font-size:11pt;font-family:Tahoma;"&gt; System;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Xml;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Diagnostics;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Xml.Serialization;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace&lt;/span&gt; Transport.Trigger&lt;br /&gt;{&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; TriggerWrapper: TriggerSchema&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; TriggerWrapper(){}&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; TriggerToString()&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MemoryStream memoryStream = &lt;span style="color:blue;"&gt;new&lt;/span&gt; MemoryStream();&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;XmlSerializer xs = &lt;span style="color:blue;"&gt;new&lt;/span&gt; XmlSerializer(&lt;br /&gt;&lt;span&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;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(TriggerWrapper)&lt;br /&gt;&lt;span&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;&amp;nbsp;&amp;nbsp; &lt;/span&gt;);&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;XmlTextWriter xmlTextWriter = &lt;span style="color:blue;"&gt;new&lt;/span&gt; XmlTextWriter(memoryStream,Encoding.Default);&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;xs.Serialize(xmlTextWriter, &lt;span style="color:blue;"&gt;this&lt;/span&gt;);&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;memoryStream = (MemoryStream)xmlTextWriter.BaseStream;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;UTF8Encoding encoding = &lt;span style="color:blue;"&gt;new&lt;/span&gt; UTF8Encoding();&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;return&lt;/span&gt; encoding.GetString(memoryStream.ToArray());&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/p&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx&amp;amp;;subject=Sharing+A+Trigger+Schema+Between+BizTalk+And+A+Trigger.exe" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx&amp;amp;;title=Sharing+A+Trigger+Schema+Between+BizTalk+And+A+Trigger.exe" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx&amp;amp;title=Sharing+A+Trigger+Schema+Between+BizTalk+And+A+Trigger.exe" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx&amp;amp;;title=Sharing+A+Trigger+Schema+Between+BizTalk+And+A+Trigger.exe" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx&amp;amp;;title=Sharing+A+Trigger+Schema+Between+BizTalk+And+A+Trigger.exe&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/07/Sharing-A-Trigger-Schema-Between-BizTalk-And-A-Trigger.exe.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18497" width="1" height="1"&gt;</description></item><item><title>%SourceFileName% Clarification – The Best Macro! (well, now anyway)</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx</link><pubDate>Thu, 01 Jun 2006 11:41:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:18231</guid><dc:creator>SteveB</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/18231.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=18231</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;It is documented by many others that the use of %SourceFileName% can allow you to change the name of the output file in your process. Or output files, depending on your process. I found a few points to add to this based on my experiences. This is based on what I have found and I am not claiming that this is the sole answer or only solution, but I hope it helps.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;%SourceFileName% is based on &lt;/SPAN&gt;&lt;SPAN&gt;FILE.ReceivedFileName. So you can use a Message Assignment to perform the following: ‘&lt;/SPAN&gt;&lt;SPAN&gt;MsgNewTrigger(FILE.ReceivedFileName) = MsgTrigger(FILE.ReceivedFileName);&lt;/SPAN&gt;&lt;SPAN&gt;’. This is of enormous benefit because you can programmatically control the outbound file name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Here are the catches and misconceptions I have found:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;1)&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;When using a solution that uses and orchestration (versus and pipeline only solution) I could not use &lt;/SPAN&gt;&lt;SPAN&gt;%SourceFileName% if I did not set this information in a message assignment. If I did not use a message assignment, %SourceFileName% is exactly the name of the file at the other end of the process. Since I was making a new trigger file based on the original trigger file, I first thought it should get the name used by the inbound file, but this is not the case. It seems very clear to me now why this happened.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;2)&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Some people have posted to others’ blogs that the use of &lt;SPAN&gt;%SourceFileName% will not work when the inbound or outbound file is not XML. After I determined what was required in step one above, I found this was not the case. My trigger file is XML and my outbound file is a zip file… actually, my outbound file starts as a new trigger file, copies the elements of the original trigger file, then has the body switched out with a zip file stream as an IBaseMessage in a custom pipeline component.&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx&amp;amp;;subject=%25SourceFileName%25+Clarification+%e2%80%93+The+Best+Macro!+(well%2c+now+anyway)" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx&amp;amp;;title=%25SourceFileName%25+Clarification+%e2%80%93+The+Best+Macro!+(well%2c+now+anyway)" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx&amp;amp;title=%25SourceFileName%25+Clarification+%e2%80%93+The+Best+Macro!+(well%2c+now+anyway)" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx&amp;amp;;title=%25SourceFileName%25+Clarification+%e2%80%93+The+Best+Macro!+(well%2c+now+anyway)" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx&amp;amp;;title=%25SourceFileName%25+Clarification+%e2%80%93+The+Best+Macro!+(well%2c+now+anyway)&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/06/01/18231.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18231" width="1" height="1"&gt;</description></item><item><title>Zip Compression In A Custom Pipeline Component</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx</link><pubDate>Tue, 30 May 2006 01:47:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:18157</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/18157.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=18157</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;U&gt;&lt;SPAN&gt;The Requirement&lt;/SPAN&gt;&lt;/U&gt;&lt;SPAN&gt;... trigger a process that that zips files and ftp's them to a location. &lt;U&gt;The Tools&lt;/U&gt;… BizTalk, .Net the ICSharpCode SharpZipLib. &lt;U&gt;The Process&lt;/U&gt;… Use a C# console application to trigger dropping an xml file that is picked up by BizTalk. This file contains the information to be used by a .net component in an orchestration to locate and compress files to the desired location while performing other housecleaning and logging. A new (modified) trigger file is created in-orchestration that contains information needed in the next step, and passed out of the orchestration. It routes into a pipeline and through a custom component. In the encoding stage the body of the message is pulled out as xml. This data contains the location of the previously compressed files as xml, which are then streamed from file and are used to replace the body of the IBaseMessage inmsg. This little (or large) stream is then passed on to the ftp adapter via the magical qualities of BizTalk.&lt;/SPAN&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx&amp;amp;;subject=Zip+Compression+In+A+Custom+Pipeline+Component" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx&amp;amp;;title=Zip+Compression+In+A+Custom+Pipeline+Component" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx&amp;amp;title=Zip+Compression+In+A+Custom+Pipeline+Component" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx&amp;amp;;title=Zip+Compression+In+A+Custom+Pipeline+Component" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx&amp;amp;;title=Zip+Compression+In+A+Custom+Pipeline+Component&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/29/18157.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18157" width="1" height="1"&gt;</description></item><item><title>Templating BizTalk Solutions</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx</link><pubDate>Thu, 18 May 2006 00:17:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:17892</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/17892.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=17892</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;It may not be very often that you need to make several nearly identical BizTalk solutions, but it is nice to know it is easy (enough) to do. My requirement was to replace several processes on a legacy system that are very nearly identical. It was required that all of the processes be separate, have different receive locations, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;My solution was to use C# to create an Xml file that acts as a trigger, and pass variables to an Orchestration, that uses an Sql adapter to pull data, transform it, and drop a flat file. After reading the Java files that the legacy system uses to do the heavy lifting, I was able to create the flat file header, body and trailer from the data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Source code is source code, all text, and BizTalk is no different. The solution I selected was to use a nifty little text editor to search and replace the project and object names. In this case almost all of the projects use a similar name for the project, objects, etc, such as P12, P12SqlData, P12SqlRequest, P12SqlResponse, etc. So why not just replace P12 with P13 and so on. The only two tricky parts were recognizing that after removing source control from the copied source, it is required that you run “attrib *.* /s –r –h –s –a” so that all files can be searched and replaced. Renaming all of the directories and files can be a little fun, but the act of renaming the directories, then the files did the trick. Hint, “dir /s /d /b *P12*” and “move &amp;lt;dir names&amp;gt; &amp;lt;dir names&amp;gt;” with a text editor, then rename the files.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;After that it was a matter of creating new Sql Adapter XSD’s (or you can edit existing ones), and realigning the maps and joy was discovered… ok, there was a small amount of editing after that, but this process did provide a nice jumpstart on templating multiple BizTalk solutions. What was really cool was the fact that all of the btsdeploy exported xml binding files were nicely receptive to this process as well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx&amp;amp;;subject=Templating+BizTalk+Solutions" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx&amp;amp;;title=Templating+BizTalk+Solutions" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx&amp;amp;title=Templating+BizTalk+Solutions" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx&amp;amp;;title=Templating+BizTalk+Solutions" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx&amp;amp;;title=Templating+BizTalk+Solutions&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/17/17892.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=17892" width="1" height="1"&gt;</description></item><item><title>Multi-Input Map Problem Using An Sql Adapter – File Blank</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx</link><pubDate>Tue, 09 May 2006 01:32:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:17559</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/17559.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=17559</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;FONT face=Tahoma&gt;Multi-Input Map Problem With Sql Adapter&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Tahoma&gt;Today I ran into a problem that caused me to pause… I added a new Transform object, selected my desired input schemas and output schema. I select the check box to open the map upon completion, but when I click OK, nothing happens. I perform the same action and the same result. Now I realize something out of the ordinary is taking place. I refresh the project and see that for every time I create a new map, mapX.btm (substitute map name and increment number) is created and they are not included in the project. I include the map in the project and try to open it and it turns out that the file is empty and BizTalk tosses an error stating that the object is formatted wrong. Lost time, less hair and I am beginning to hope that something odd has not taken place in my Visual Studio installation. When I use any schemas other than the new Sql Adapters, the map creation process works… now I have something to go on.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Tahoma&gt;As it turns out, I had created a new Sql Port, and in my hurry I used the name space of the main project. &lt;/FONT&gt;&lt;A href="http://project/"&gt;&lt;FONT face=Tahoma&gt;http://project&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma&gt; (names have been changed for their own protection). Being a lazy programmer and former sysadmin who commonly avoids the use of the mouse, I had copied this text with ctl-c. This is the same namespace that I used when creating the Sql Adapter based on the new Sql Port with a neat ctl-v. It turns out the answer was to adjust the namespace in the Sql Port and the Sql Adapter XSD file. I right mouse the XSD and use my favorite text editor to adjust the namespace in Sql Adapter XSD file to &lt;/FONT&gt;&lt;A href="http://project/sqladapter"&gt;&lt;FONT face=Tahoma&gt;http://project/sqladapter&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma&gt;. Then I adjust the namespace used in the Sql Port and test the map creatin again… bingo! Multi-map happiness using the SqlResponse message part is again in the air!&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Tahoma&gt;Don’t hurry… precious minutes can get hurt this way.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx&amp;amp;;subject=Multi-Input+Map+Problem+Using+An+Sql+Adapter+%e2%80%93+File+Blank" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx&amp;amp;;title=Multi-Input+Map+Problem+Using+An+Sql+Adapter+%e2%80%93+File+Blank" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx&amp;amp;title=Multi-Input+Map+Problem+Using+An+Sql+Adapter+%e2%80%93+File+Blank" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx&amp;amp;;title=Multi-Input+Map+Problem+Using+An+Sql+Adapter+%e2%80%93+File+Blank" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx&amp;amp;;title=Multi-Input+Map+Problem+Using+An+Sql+Adapter+%e2%80%93+File+Blank&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/08/17559.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=17559" width="1" height="1"&gt;</description></item><item><title>Changing Stored Procedures In BizTalk 2004 Sql Adapters For Speed And Development</title><link>http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx</link><pubDate>Fri, 05 May 2006 01:57:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:17379</guid><dc:creator>SteveB</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/biztalk/comments/17379.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/biztalk/commentrss.aspx?PostID=17379</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;This post expects that you are creating an SQL Adapter in an orchestration using a Static One Way Send Port in the BizTalk Server Manager. Go ahead and adjust as you see fit.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;One project I am working on takes about eight minutes to run each SP needed for the BizTalk process. Actually this is the case for many of the SP’s. The joins are amazing, and I have no control over it’s optimization (so please do not suggest optimization… that is out of my hands for today). This causes the Sql Adapter creation process to time out, in addition to killing development time.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;My answer was to cache the output into another table on my local PC. Then I make a temporary SP (locally) with the name of the SP I want to use in the long term. This local SP outputs the locally cached table data and appends FOR XML AUTO. It is then easy to add and remove the XMLDATA as needed for creation of the SQL Adapter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;But I had a new problem. For reasons I cannot quite explain (I’m sure others can answer it), when I switched back to using the real SP, the column names came out as the join aliases, rather than what the cached table column names were. Actually there were worse problems, but this was bad enough. I did not want to change my BizTalk project to account for these column names.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Luckily the answer was not all that different from using the caching table… use a temp table in the SP. The simple addition of:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;INTO&lt;/SPAN&gt;&lt;SPAN&gt; #tempTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;In the appropriate location started the answer. Then, at the bottom of the SP I added:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;SELECT&lt;/SPAN&gt;&lt;SPAN&gt; &lt;SPAN&gt;*&lt;/SPAN&gt; &lt;SPAN&gt;FROM&lt;/SPAN&gt; #tempTable &lt;SPAN&gt;as&lt;/SPAN&gt; &amp;lt;name used in SQL Adapter&amp;gt; &lt;SPAN&gt;FOR&lt;/SPAN&gt; &lt;SPAN&gt;XML&lt;/SPAN&gt; &lt;SPAN&gt;AUTO&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;DROP&lt;/SPAN&gt;&lt;SPAN&gt; &lt;SPAN&gt;TABLE&lt;/SPAN&gt; # tempTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The alias was very important, because the SQL Adapter creation had assigned the name used as the returned dataset and I did not want to break this (note, you can adjust the SQL Adapter XSD to account for this, but not in this posting). &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx&amp;amp;;subject=Changing+Stored+Procedures+In+BizTalk+2004+Sql+Adapters+For+Speed+And+Development" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx&amp;amp;;title=Changing+Stored+Procedures+In+BizTalk+2004+Sql+Adapters+For+Speed+And+Development" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx&amp;amp;title=Changing+Stored+Procedures+In+BizTalk+2004+Sql+Adapters+For+Speed+And+Development" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx&amp;amp;;title=Changing+Stored+Procedures+In+BizTalk+2004+Sql+Adapters+For+Speed+And+Development" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx&amp;amp;;title=Changing+Stored+Procedures+In+BizTalk+2004+Sql+Adapters+For+Speed+And+Development&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/biztalk/archive/2006/05/04/17379.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=17379" width="1" height="1"&gt;</description></item></channel></rss>