﻿<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://developers.de/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>Nadine's Posts : SQL Server 2005</title><link />http://developers.de/blogs/nadine_storandt/archive/tags/SQL+Server+2005/default.aspx<description>Tags: SQL Server 2005</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>Error Reporting Service - Report cannot generate</title><link />http://developers.de/blogs/nadine_storandt/archive/2007/01/24/Error-Reporting-Service-_2D00_-Report-cannot-generate.aspx<pubdate>Wed, 24 Jan 2007 13:32:00 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1151</guid><dc:creator>Nadine Storandt</dc:creator><slash:comments>0</slash:comments><wfw:commentrss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://developers.de/blogs/nadine_storandt/rsscomments.aspx?PostID=1151</wfw:commentrss><comments>http://developers.de/blogs/nadine_storandt/archive/2007/01/24/Error-Reporting-Service-_2D00_-Report-cannot-generate.aspx#comments</comments><description>&lt;p&gt;Hey guys, &lt;/p&gt;&lt;p&gt;&amp;nbsp;i have found a nice bug in Reporting Services. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you have configured a DataSource and add a field from another DataSet to the Data Source and try to preview your Report in Visual Studio you get an exception that the report cannot generate. &lt;/p&gt;&lt;p&gt;Then Visual Studio make a restart. &lt;/p&gt;&lt;p&gt;The Error in the Event Viewer looks as follows: &lt;/p&gt;&lt;p&gt;Event Id: 1000&lt;/p&gt;&lt;p&gt;Event Source: Microsoft Visual Studio&lt;/p&gt;&lt;font size="1"&gt;&lt;p&gt;Faulting application devenv.exe, version 8.0.50727.762, stamp 45716759, faulting module kernel32.dll, version 5.1.2600.2945, stamp 44ab9a84, debug? 0, fault address 0x00012a5b.&lt;/p&gt;&lt;/font&gt;&lt;p&gt;I don&amp;#39;t have a resolution for this problem yet, but if I get one I will post it here later.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Or if someone knows the problem i would be glad&amp;nbsp;when they sent me the resolution for this problem.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1151" width="1" height="1"&gt;</description><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SSRS/default.aspx">SSRS</category></item><item><title>How to Insert or Update records in SSIS DataFlow</title><link />http://developers.de/blogs/nadine_storandt/archive/2006/12/07/How-to-Insert-or-Update-records-in-SSIS-DataFlow.aspx<pubdate>Thu, 07 Dec 2006 10:53:00 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1108</guid><dc:creator>Nadine Storandt</dc:creator><slash:comments>20</slash:comments><wfw:commentrss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://developers.de/blogs/nadine_storandt/rsscomments.aspx?PostID=1108</wfw:commentrss><comments>http://developers.de/blogs/nadine_storandt/archive/2006/12/07/How-to-Insert-or-Update-records-in-SSIS-DataFlow.aspx#comments</comments><description>&lt;p&gt;If you import Data from&amp;nbsp;a specified Source periodically in an Integration Service Project and you need to update existing data in the SQL Destination the best workaround for this is as following: &lt;/p&gt;&lt;p&gt;First define a Source in the data flow e.g. Ole DB Source, make sure that your Columns does not contain NULL Values, this you can do with the Derived Column Shape then add a Script Component to the Data Flow - now your Data Flow should look like the following picture:&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://developers.de/photos/nadine_storandt/picture1111.aspx" target="_blank"&gt;&lt;img border="0" height="669" src="http://developers.de/photos/storage/1000.92.1111.DataFlow.JPG" width="1285" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the Script Component you have to define the input source and the output source. Right click on the Script Component and click &amp;#39;Edit&amp;#39;, then go to &amp;#39;Inputs and Outputs&amp;#39; you can rename the Input and Output Name. In the&amp;nbsp;Output you should set the Exclusion Group to 1 and the SynchronousInputID to the ID of the Input in this case the ID is &amp;#39;243&amp;#39; per default the first output has the ID. In the following Picture you see the configuration. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://developers.de/photos/nadine_storandt/picture1110.aspx" target="_blank"&gt;&lt;img border="0" height="643" src="http://developers.de/photos/storage/1000.92.1110.ScriptComponentConfiguration.JPG" width="960" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The next step: &lt;/p&gt;&lt;p&gt;Go to the option Script and click the button Design Script, now Visual Studio will be open where you can define your source code, the default language is VB: &lt;/p&gt;&lt;p&gt;Here is a little code snippet for a Insert Update procedure: &lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; reader &lt;span style="color:blue;"&gt;As&lt;/span&gt; SqlClient.SqlDataReader&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;sqlConn = &lt;span style="color:blue;"&gt;New&lt;/span&gt; SqlClient.SqlConnection(&lt;span style="color:maroon;"&gt;&amp;quot;Data Source=Servername;Initial Catalog=Databse;Integrated Security=True&amp;quot;&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;sqlConn.Open()&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;sqlCmd = &lt;span style="color:blue;"&gt;New&lt;/span&gt; SqlClient.SqlCommand(&lt;span style="color:maroon;"&gt;&amp;quot;SELECT * FROM Tabelle WHERE(ID = @ID)&amp;quot;&lt;/span&gt;, sqlConn)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;sqlParam = &lt;span style="color:blue;"&gt;New&lt;/span&gt; SqlClient.SqlParameter(&lt;span style="color:maroon;"&gt;&amp;quot;@ID&amp;quot;&lt;/span&gt;, SqlDbType.NVarChar, 50)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;sqlCmd.Parameters.Add(sqlParam)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;sqlCmd.Parameters(&lt;span style="color:maroon;"&gt;&amp;quot;@ID&amp;quot;&lt;/span&gt;).Value = Row.Bestellnummer&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;reader = sqlCmd.ExecuteReader()&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:blue;"&gt;If&lt;/span&gt; reader.Read() &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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:green;"&gt;&amp;#39;do all field comparisons here to determine if &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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:green;"&gt;&amp;#39;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;the record changed since the last ETL.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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;If&lt;/span&gt; (reader(&lt;span style="color:maroon;"&gt;&amp;quot;AmountOfHardware&amp;quot;&lt;/span&gt;).ToString() &amp;lt;&amp;gt; Row.Summe) &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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; &lt;/span&gt;reader.Close()&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;sqlCmd = &lt;span style="color:blue;"&gt;New&lt;/span&gt; SqlClient.SqlCommand(&lt;span style="color:maroon;"&gt;&amp;quot;Update TBestellmassnahme Set AmountOfHardware = @Sum Where ID = @ID &amp;quot;&lt;/span&gt;, sqlConn)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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; &lt;/span&gt;sqlParam = &lt;span style="color:blue;"&gt;New&lt;/span&gt; SqlClient.SqlParameter(&lt;span style="color:maroon;"&gt;&amp;quot;@Sum&amp;quot;&lt;/span&gt;, SqlDbType.NVarChar, 50)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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; &lt;/span&gt;sqlCmd.Parameters.Add(sqlParam)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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; &lt;/span&gt;sqlCmd.Parameters(&lt;span style="color:maroon;"&gt;&amp;quot;@Sum&amp;quot;&lt;/span&gt;).Value = Row.Summe&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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; &lt;/span&gt;sqlParam = &lt;span style="color:blue;"&gt;New&lt;/span&gt; SqlClient.SqlParameter(&lt;span style="color:maroon;"&gt;&amp;quot;@ID&amp;quot;&lt;/span&gt;, SqlDbType.NVarChar, 50)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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; &lt;/span&gt;sqlCmd.Parameters.Add(sqlParam)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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; &lt;/span&gt;sqlCmd.Parameters(&lt;span style="color:maroon;"&gt;&amp;quot;@ID&amp;quot;&lt;/span&gt;).Value = Row.Bestellnummer&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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; &lt;/span&gt;sqlCmd.ExecuteNonQuery()&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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;Else&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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;End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Else&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt 72pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;&amp;#39;if the reader contains no data the row will be redirect to &amp;#39;the output source which could be the Insert Statement&lt;/span&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&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;Row.DirectRowToOutputInsert()&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;reader.Close()&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;sqlConn.Close()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;After you have insert the script you should add an OLE DB Command Shape to the Output of the Script Component. In this Command Shape you could define the Insert Statement as you need. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1108" width="1" height="1"&gt;</description><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>Error: There is already an open DataReader associated with this Command which must be closed first</title><link />http://developers.de/blogs/nadine_storandt/archive/2006/12/07/Error_3A00_-There-is-already-an-open-DataReader-associated-with-this-Command-which-must-be-closed-first.aspx<pubdate>Thu, 07 Dec 2006 10:40:00 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1107</guid><dc:creator>Nadine Storandt</dc:creator><slash:comments>8</slash:comments><wfw:commentrss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://developers.de/blogs/nadine_storandt/rsscomments.aspx?PostID=1107</wfw:commentrss><comments>http://developers.de/blogs/nadine_storandt/archive/2006/12/07/Error_3A00_-There-is-already-an-open-DataReader-associated-with-this-Command-which-must-be-closed-first.aspx#comments</comments><description>&lt;p&gt;If you receive the following error message &lt;strong&gt;There is already an open DataReader associated with this Command which must be closed first &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;and you are sure that all dataReader are closed the following workaround can help you. &lt;/p&gt;&lt;p&gt;The MARS default settings has changed at release RC1, so multiple Result Sets are off. To turn it on only add the following string to your Connection String. &lt;/p&gt;&lt;p&gt;MultipleActiveResultSets=True&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1107" width="1" height="1"&gt;</description><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SQL 2005 SSIS Excel Source Insert NULL Values for all Records</title><link />http://developers.de/blogs/nadine_storandt/archive/2006/12/05/SQL-2005-SSIS-Excel-Source-Insert-NULL-Values-for-all-Records.aspx<pubdate>Tue, 05 Dec 2006 11:11:00 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1100</guid><dc:creator>Nadine Storandt</dc:creator><slash:comments>18</slash:comments><wfw:commentrss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://developers.de/blogs/nadine_storandt/rsscomments.aspx?PostID=1100</wfw:commentrss><comments>http://developers.de/blogs/nadine_storandt/archive/2006/12/05/SQL-2005-SSIS-Excel-Source-Insert-NULL-Values-for-all-Records.aspx#comments</comments><description>&lt;p&gt;Hi, &lt;/p&gt;&lt;p&gt;I&amp;#39;m just getting confused today, because I tried to import Data from a Excel Source, but one column contains only NULL Values, but in the Excel Source there are a few entries for this column. &lt;/p&gt;&lt;p&gt;So the problem was SSIS Excel Source only look at the first 8 Rows if they contain the same value SSIS decide to use the same data type for all entries. &lt;/p&gt;&lt;p&gt;To fix this problem you have to add the following property&amp;nbsp;to the Connection String of your Excel Connection Manager: &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Excel 8.0;HDR=YES;IMEX=1 &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The property IMEX = 1 specifies that all datatypes should be import which are defined in the Excel Source. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1100" width="1" height="1"&gt;</description><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SQL 2005 SP1 Problem</title><link />http://developers.de/blogs/nadine_storandt/archive/2006/11/09/SQL-2005-SP1-Problem.aspx<pubdate>Thu, 09 Nov 2006 13:27:00 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1028</guid><dc:creator>Nadine Storandt</dc:creator><slash:comments>0</slash:comments><wfw:commentrss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://developers.de/blogs/nadine_storandt/rsscomments.aspx?PostID=1028</wfw:commentrss><comments>http://developers.de/blogs/nadine_storandt/archive/2006/11/09/SQL-2005-SP1-Problem.aspx#comments</comments><description>&lt;p&gt;I run today in many problems. I have installed the Service Pack 1 for SQL Server 2005. &lt;/p&gt;&lt;p&gt;The first problem was the Service Pack was not installed correct in Event Log I received the following error: &lt;/p&gt;&lt;p&gt;&lt;font size="1"&gt;Installation Failure: Windows failed to install the following update with error 0x80070643: Microsoft SQL Server 2005 Service Pack 1 (KB 913090).&lt;p&gt;This error append to the next error&amp;nbsp;I receive in the EventLog: &lt;/p&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;This error append to the next error&amp;nbsp;I receive in the EventLog: &lt;/p&gt;&lt;font size="1"&gt;&lt;p&gt;The SQL Server (SQL2005) service terminated with service-specific error 17058 (0x42A2).&lt;/p&gt;&lt;/font&gt;&lt;p&gt;The SQL Server 2005 Service was terminated and I can&amp;#39;t start him again. &lt;/p&gt;&lt;p&gt;The resolution of this problem is as follows: &lt;/p&gt;&lt;p&gt;1. Uninstall all SQL Servers 2000/2005 &lt;/p&gt;&lt;p&gt;2. Reinstall SQL 2005 first then run the Service Pack&amp;nbsp;1 &lt;/p&gt;&lt;p&gt;3. Reinstall SQL 2000 &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;font size="1"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1028" width="1" height="1"&gt;</description><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SQL+Server+2000/default.aspx">SQL Server 2000</category><category domain="http://developers.de/blogs/nadine_storandt/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category></item></channel></rss>