<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.developerdotstar.com/community" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>developer.* Blogs - SSIS (SQL Server Integration Services) - Comments</title>
 <link>http://www.developerdotstar.com/community/taxonomy/term/58</link>
 <description>Comments for &quot;SSIS (SQL Server Integration Services)&quot;</description>
 <language>en</language>
<item>
 <title>Thank you!</title>
 <link>http://www.developerdotstar.com/community/node/338#comment-8859</link>
 <description>&lt;p&gt;I was getting slammed by nullability until I came across your post. Thank you for posting this! Rick&lt;/p&gt;
</description>
 <pubDate>Mon, 30 Apr 2007 16:44:12 -0700</pubDate>
 <dc:creator>Guest</dc:creator>
 <guid isPermaLink="false">comment 8859 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>I&#039;ve just been asked to</title>
 <link>http://www.developerdotstar.com/community/node/364#comment-8668</link>
 <description>&lt;p&gt;I&#039;ve just been asked to create a SSIS solution for our company. This is really a great jumping off point to get the information I need to start...&lt;/p&gt;
&lt;p&gt;Thanks&lt;br /&gt;
-WM&lt;br /&gt;
DBA&lt;/p&gt;
</description>
 <pubDate>Wed, 25 Apr 2007 12:04:52 -0700</pubDate>
 <dc:creator>Guest</dc:creator>
 <guid isPermaLink="false">comment 8668 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Not Sure...</title>
 <link>http://www.developerdotstar.com/community/node/512#comment-8485</link>
 <description>&lt;p&gt;Sorry, dave, but nothing jumps out at me other than the use of &quot;RdVar&quot; vs. &quot;ReadVariable&quot;--but that may have just been shorthand you&#039;re using for your example.&lt;/p&gt;
&lt;p&gt;One possibility does come to mind: is it possible that you&#039;ve also declared the &quot;SQL&quot; variable as read only in the Script Task dialog box? That might cause the behavior you describe. When using ReadVariable() and WriteVariable() you do not need to (and probably should not) declare the variables on the Script Task &quot;Edit&quot; dialog as available to the script.&lt;/p&gt;
&lt;p&gt;Hope that helps,&lt;br /&gt;
Dan&lt;/p&gt;
</description>
 <pubDate>Wed, 18 Apr 2007 09:08:57 -0700</pubDate>
 <dc:creator>Daniel Read</dc:creator>
 <guid isPermaLink="false">comment 8485 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Cannot write to package level variable</title>
 <link>http://www.developerdotstar.com/community/node/512#comment-8470</link>
 <description>&lt;p&gt;Hi Dan,&lt;br /&gt;
I still cannot write to a package level variable in a Script Task.  I have 2 variables to create a SQL statement.&lt;/p&gt;
&lt;div class=&quot;codeblock&quot;&gt;
&lt;pre&gt;  Dim LastRecord As String, sSQL As String&lt;br /&gt;  LastRecord = CType(ReadVariable(&amp;quot;LastRow&amp;quot;), String)&lt;br /&gt;  sSQL = &amp;quot;SELECT * FROM MyTable WHERE RecID&amp;gt;&amp;quot; &amp;amp; LastRecord&lt;br /&gt;  WriteVariable(&amp;quot;SQL&amp;quot;, sSQL)&lt;br /&gt;  sSQL = CType(RdVar(&amp;quot;SQL&amp;quot;), String)&lt;br /&gt;  MsgBox(sSQL)&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I&#039;m able to read the value of LastRecord but when I appended to sSQL and call WriteVariable, the MsgBox () shows only the initial value of the Package variable (SQL).  Apparently it did not save it... any help???&lt;br /&gt;
Thanks in advance&lt;/p&gt;
</description>
 <pubDate>Tue, 17 Apr 2007 16:59:21 -0700</pubDate>
 <dc:creator>dave</dc:creator>
 <guid isPermaLink="false">comment 8470 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Fast Load is it!</title>
 <link>http://www.developerdotstar.com/community/node/727#comment-8456</link>
 <description>&lt;p&gt;Well all right! Thanks to Nick and Guest for encouraging me to look closer at the Fast Load option of the OLE DB Destination. For some reason I was sure that Fast Load was no good unless everything was local, but I think I may have been confusing that memory with a situation where I was using a Flat File Source...&lt;/p&gt;
&lt;p&gt;Anyway, in my current project when I changed the OLE DB Destination to use the Fast Load option, sure enough the &quot;Keep identity&quot; option was there, and when I tested it using a remote database connected via SQL authentication, it worked great. I&#039;ll update the top of my post so that new readers won&#039;t have to wade through my rant to find the good stuff.&lt;/p&gt;
&lt;p&gt;Thanks again for the suggestions.&lt;/p&gt;
&lt;p&gt;Dan&lt;/p&gt;
</description>
 <pubDate>Tue, 17 Apr 2007 08:20:05 -0700</pubDate>
 <dc:creator>Daniel Read</dc:creator>
 <guid isPermaLink="false">comment 8456 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Slight variation when in Script Components</title>
 <link>http://www.developerdotstar.com/community/node/512#comment-8455</link>
 <description>&lt;p&gt;Hi Daniel:&lt;br /&gt;
As the guest poster on 3/31/07 reported, I also found I had to modify the syntax slightly when using these functions in a data flow Script Component (these functions work perfectly in control flow Script Tasks). Don&#039;t know why there&#039;s a difference, but the &quot;vars&quot; object variable has to be declared as:&lt;br /&gt;
Dim vars As IDTSVariables90&lt;br /&gt;
And the VariableDispenser appears to be a static class owned by the Script Component. The &quot;Dts&quot; namespace causes an error, so the following works fine:&lt;br /&gt;
VariableDispenser.LockForRead(varName)&lt;/p&gt;
&lt;p&gt;BTW: One big reason for using these functions is because SSIS seems to mangle variable names passed to Script Components. When using the ReadOnlyVariables property of the Script Component, my variables (ImportFile_Name and ImportFile_Path) are missing their underscores within the Script Component&#039;s code (ImportFileName and ImportFilePath). This made it pretty hard to use the &quot;Me.Variables.&quot; as documented in online help. &lt;/p&gt;
&lt;p&gt;IMO, it&#039;s much cleaner and symmetric to use your functions for reading and writing variables, rather than relying on the ReadOnlyVariables and ReadWriteVariables properties. Code is much easier to read and understand when using your functions.&lt;/p&gt;
</description>
 <pubDate>Tue, 17 Apr 2007 07:36:24 -0700</pubDate>
 <dc:creator>MikeG</dc:creator>
 <guid isPermaLink="false">comment 8455 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>OLE DB Destination != SQL Server Destination</title>
 <link>http://www.developerdotstar.com/community/node/727#comment-8450</link>
 <description>&lt;p&gt;I believe you are confusing OLE DB Destination with SQL Server Destination.  An OLE DB Destination, even with fast load, does not require local resources.&lt;/p&gt;
</description>
 <pubDate>Tue, 17 Apr 2007 07:07:03 -0700</pubDate>
 <dc:creator>Guest</dc:creator>
 <guid isPermaLink="false">comment 8450 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Re: Fast Load = Bulk Insert</title>
 <link>http://www.developerdotstar.com/community/node/727#comment-8427</link>
 <description>&lt;p&gt;Dan,&lt;/p&gt;
&lt;p&gt;Sorry this wasn&#039;t of use to you.  If it helps clarify anything the databases I was transferring between were on separate servers (and I was running the integration services package from my desktop) but I was using SQL Authentication which is my preferred access method as we tend to work across different domains.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Nick&lt;/p&gt;
</description>
 <pubDate>Tue, 17 Apr 2007 01:29:37 -0700</pubDate>
 <dc:creator>NickFoster</dc:creator>
 <guid isPermaLink="false">comment 8427 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Fast Load = Bulk Insert</title>
 <link>http://www.developerdotstar.com/community/node/727#comment-8417</link>
 <description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;Thank you for mentioning this, Nick. I had forgotten that possibility. However, if I&#039;m not mistaken, there&#039;s a good reason I didn&#039;t think of it as an option: choosing &quot;Fast Load&quot; is the equivalent of doing bulk insert, which brings with it the requirement for the data source, SSIS instance, and data target to be on the same machine as local resources and logged on with Windows authentication. This just isn&#039;t viable in my situation.&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;br /&gt;
Dan&lt;/p&gt;
</description>
 <pubDate>Mon, 16 Apr 2007 16:23:54 -0700</pubDate>
 <dc:creator>Daniel Read</dc:creator>
 <guid isPermaLink="false">comment 8417 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Fast Load</title>
 <link>http://www.developerdotstar.com/community/node/727#comment-8373</link>
 <description>&lt;p&gt;I had exactly this problem today.  However I found that if you change the data access mode of the OLE DB Destination to &quot;Table or View - fast load&quot; it gives you the options &quot;Keep Identity&quot; and &quot;Keep Nulls&quot;.&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;
Nick&lt;/p&gt;
</description>
 <pubDate>Mon, 16 Apr 2007 03:48:14 -0700</pubDate>
 <dc:creator>NickFoster</dc:creator>
 <guid isPermaLink="false">comment 8373 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Much appreceiated</title>
 <link>http://www.developerdotstar.com/community/node/512#comment-8014</link>
 <description>&lt;p&gt;I have struggled for a week with the &#039;Can&#039;t get lock on variable&#039; error meesage.  I used your example and it all works fine.  Please send this to MS and tell them to include it in their documentation.&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;
</description>
 <pubDate>Mon, 02 Apr 2007 09:53:28 -0700</pubDate>
 <dc:creator>Arthur Hill</dc:creator>
 <guid isPermaLink="false">comment 8014 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Variable naming in your procedure</title>
 <link>http://www.developerdotstar.com/community/node/512#comment-8012</link>
 <description>&lt;p&gt;Everything I read says you have to refer to variables by their scope, such as &#039;User::DirectoryIncoming&#039; or &#039;System::Something&#039;.  In your example above you do not use the namespace qualifier.  Why?  Is it not necessary?&lt;/p&gt;
</description>
 <pubDate>Mon, 02 Apr 2007 09:14:30 -0700</pubDate>
 <dc:creator>Arthur Hill</dc:creator>
 <guid isPermaLink="false">comment 8012 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>ssis vars in scripts</title>
 <link>http://www.developerdotstar.com/community/node/512#comment-7903</link>
 <description>&lt;p&gt;This stuff is a life-saver.  I could use your&lt;br /&gt;
Dts.VariableDispenser... for a scripts task, but could not for a script component which was reading a table. In your code above (both for read &amp;amp; write) I had to change the &quot;DTs&quot; to &quot;Me&quot;, then variable collection was changed also.  Here&#039;s the variantions on routines:&lt;/p&gt;
&lt;div class=&quot;codeblock&quot;&gt;
&lt;pre&gt;   Private Function ReadVariable(ByVal varName As String) As Object&lt;br /&gt;        Dim result As Object&lt;br /&gt;        Try&lt;br /&gt;            Dim vars As IDTSVariables90&lt;br /&gt;            Me.VariableDispenser.LockForRead(varName)&lt;br /&gt;            Me.VariableDispenser.GetVariables(vars)&lt;br /&gt;            Try&lt;br /&gt;                result = vars(varName).Value&lt;br /&gt;            Catch ex As Exception&lt;br /&gt;                Throw ex&lt;br /&gt;            Finally&lt;br /&gt;                vars.Unlock()&lt;br /&gt;            End Try&lt;br /&gt;        Catch ex As Exception&lt;br /&gt;            Throw ex&lt;br /&gt;        End Try&lt;br /&gt;        Return result&lt;br /&gt;    End Function&lt;br /&gt;&lt;br /&gt;    Private Sub WriteVariable(ByVal varName As String, ByVal varValue As Object)&lt;br /&gt;        Try&lt;br /&gt;            Dim vars As IDTSVariables90&lt;br /&gt;            Me.VariableDispenser.LockForWrite(varName)&lt;br /&gt;            Me.VariableDispenser.GetVariables(vars)&lt;br /&gt;            Try&lt;br /&gt;                vars(varName).Value = varValue&lt;br /&gt;            Catch ex As Exception&lt;br /&gt;                Throw ex&lt;br /&gt;            Finally&lt;br /&gt;                vars.Unlock()&lt;br /&gt;            End Try&lt;br /&gt;        Catch ex As Exception&lt;br /&gt;            Throw ex&lt;br /&gt;        End Try&lt;br /&gt;    End Sub&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is probably not the way to go, but maybe you can improve it.  Thanks much&lt;/p&gt;
</description>
 <pubDate>Sat, 31 Mar 2007 13:28:22 -0700</pubDate>
 <dc:creator>Guest</dc:creator>
 <guid isPermaLink="false">comment 7903 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>SSIS Scripting Shortcomings</title>
 <link>http://www.developerdotstar.com/community/node/512#comment-7291</link>
 <description>&lt;p&gt;imFrustrated wrote: &quot;Is there no global scripting library that all script task have visibility to?&quot;&lt;/p&gt;
&lt;p&gt;Not as far as I can tell, there is not, no. The scripting integration at both design time and runtime is pretty clunky. You will do a lot of copying and pasting. When I was writing a lot of code in SSIS I had a  I hope this is one area they will be able to improve in future releases.&lt;/p&gt;
&lt;p&gt;Dan&lt;/p&gt;
&lt;p&gt;P.S.&lt;br /&gt;
See also &lt;a href=&quot;http://www.developerdotstar.com/community/node/333&quot; title=&quot;Fun With SSIS, Script Tasks, and the GAC&quot;&gt;this post&lt;/a&gt; for another example of what I mean by &quot;clunky.&quot;&lt;/p&gt;
</description>
 <pubDate>Sun, 18 Mar 2007 15:33:00 -0700</pubDate>
 <dc:creator>Daniel Read</dc:creator>
 <guid isPermaLink="false">comment 7291 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Just so I understand</title>
 <link>http://www.developerdotstar.com/community/node/512#comment-7271</link>
 <description>&lt;p&gt;Nice blog post first of all.&lt;/p&gt;
&lt;p&gt;I am new to SSIS, is what you are saying that I have to copy these functions to each script task?  Is there no global scripting library that all script task have visibility to?&lt;/p&gt;
</description>
 <pubDate>Sat, 17 Mar 2007 07:28:21 -0700</pubDate>
 <dc:creator>imFurstrated</dc:creator>
 <guid isPermaLink="false">comment 7271 at http://www.developerdotstar.com/community</guid>
</item>
</channel>
</rss>
