<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Miscellaneous Ramblings on Hacking</title>
	<atom:link href="http://dichotic.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dichotic.wordpress.com</link>
	<description>Data Warehouse, ETL, and Whatever Else</description>
	<lastBuildDate>Tue, 20 Oct 2009 16:50:41 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dichotic.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/04881378cabb2e6928b53e16ca1f9004?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Miscellaneous Ramblings on Hacking</title>
		<link>http://dichotic.wordpress.com</link>
	</image>
			<item>
		<title>SSIS: Waiting for a file</title>
		<link>http://dichotic.wordpress.com/2009/10/20/ssis-waiting-for-a-file/</link>
		<comments>http://dichotic.wordpress.com/2009/10/20/ssis-waiting-for-a-file/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 16:50:41 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[ETL]]></category>
		<category><![CDATA[SQL Server Integration Services]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/2009/10/20/ssis-waiting-for-a-file/</guid>
		<description><![CDATA[With longer running processes, it is a common practice to create a 0-byte file as a signal to a dependent process. An example would be the data transfer via FTP of several files to a staging directory. This post shows how to wait for the 0-byte file.
Control Flow
When complete, the control flow for this package [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=69&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>With longer running processes, it is a common practice to create a 0-byte file as a signal to a dependent process. An example would be the data transfer via FTP of several files to a staging directory. This post shows how to wait for the 0-byte file.</p>
<h5>Control Flow</h5>
<p>When complete, the control flow for this package will have the following items defined:</p>
<ul>
<li><font size="2" face="Courier New">For Loop Container</font> – this makes the process continue in a loop until the 0byte file is found </li>
<li><font size="2" face="Courier New">Check File</font> script task – this checks for the presence of a file and sets a Boolean variable to True or False </li>
<li><font size="2" face="Courier New">Sleep</font> script task – this will create a time delay so that the process isn’t checking every nano-second </li>
<li><font size="2" face="Courier New">Move CheckFile</font> script task – this moves the 0byte file to avoid conflicts with subsequent data runs </li>
</ul>
<p>The control flow will appear as follows:</p>
<p><a href="http://dichotic.files.wordpress.com/2009/10/capture.jpg"><img style="display:inline;border-width:0;" title="Control Flow" border="0" alt="Control Flow" src="http://dichotic.files.wordpress.com/2009/10/capture_thumb.jpg?w=404&#038;h=129" width="404" height="129" /></a></p>
<h5></h5>
<h5>Variables</h5>
<p>The following variables need to be defined:</p>
<table border="1" cellspacing="0" cellpadding="2" width="491">
<tbody>
<tr>
<td valign="top" width="137"><em>Variable</em></td>
<td valign="top" width="83"><em>DataType</em></td>
<td valign="top" width="269"><em>Purpose</em></td>
</tr>
<tr>
<td valign="top" width="139"><font size="1">CheckFile</font></td>
<td valign="top" width="87"><font size="1">String</font></td>
<td valign="top" width="265"><font size="1">Filename of the 0-byte file to look for</font></td>
</tr>
<tr>
<td valign="top" width="140"><font size="1">CheckFileExists</font></td>
<td valign="top" width="90"><font size="1">Boolean</font></td>
<td valign="top" width="262"><font size="1">Boolean flag that is set to true upon detection of the 0-byte file</font></td>
</tr>
<tr>
<td valign="top" width="141"><font size="1">FFDataPath</font></td>
<td valign="top" width="92"><font size="1">String</font></td>
<td valign="top" width="260"><font size="1">Staging directory where the 0-byte file is expected to be placed</font></td>
</tr>
<tr>
<td valign="top" width="141"><font size="1">SleepMinutes</font></td>
<td valign="top" width="94"><font size="1">Int32</font></td>
<td valign="top" width="259"><font size="1">Number of minutes to sleep between checks for the 0-byte file</font></td>
</tr>
</tbody>
</table>
<h6>Definition: For Loop Container</h6>
<p>Configured to loop while User variable User::CheckFileExists is equal to ‘False’.</p>
<table border="1" cellspacing="0" cellpadding="0" width="493">
<tbody>
<tr>
<td valign="top" width="200"><font size="1">InitExpression</font></td>
<td valign="top" width="291"><font size="1"></font></td>
</tr>
<tr>
<td valign="top" width="200"><font size="1">EvalExpression</font></td>
<td valign="top" width="291"><font size="1">@[User::CheckFileExists]==False</font></td>
</tr>
<tr>
<td valign="top" width="200"><font size="1">AssignExpression</font></td>
<td valign="top" width="291"><font size="1"></font></td>
</tr>
</tbody>
</table>
<h6>Definition: CheckFile Script Task</h6>
<p>Configured to manipulate the value of the User variable User::CheckFileExists to ‘True’ or ‘False’.</p>
<table border="1" cellspacing="0" cellpadding="1" width="491">
<tbody>
<tr>
<td valign="top" width="201"><font size="1">ReadOnlyVariables</font></td>
<td valign="top" width="288"><font size="1">User::CheckFile, User::FFDataPath</font></td>
</tr>
<tr>
<td valign="top" width="202"><font size="1">ReadWriteVariables</font></td>
<td valign="top" width="287"><font size="1">User::CheckFileExists</font></td>
</tr>
</tbody>
</table>
<p>The script task will then execute the following code:</p>
</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:26bc8c54-c511-4ac3-80ad-08e97ed7b0ca" class="wlWriterEditableSmartContent">
<pre style="background-color:#EBEBEB;overflow:auto;font-family:Lucida Console;font-size:9px;"><span style="color:#000000;">Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.IO

Public Class ScriptMain

    </span><span style="color:#800000;">'</span><span style="color:#800000;"> The execution engine calls this method when the task executes.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> To access the object model, use the Dts object. Connections, variables, events,</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> and logging features are available as static members of the Dts class.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> </span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> To open Code and Text Editor Help, press F1.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> To open Object Browser, press Ctrl+Alt+J.</span><span style="color:#800000;">
</span><span style="color:#000000;">
    Public Sub Main()
        </span><span style="color:#800000;">'
</span><span style="color:#000000;">        </span><span style="color:#800000;">'</span><span style="color:#800000;"> Created by: Zack Bethem @ AmberLeaf</span><span style="color:#800000;">
</span><span style="color:#000000;">        </span><span style="color:#800000;">'
</span><span style="color:#000000;">        Dim fileLoc, fileName As String
        If Dts.Variables.Contains(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::FFDataPath</span><span style="color:#800000;">"</span><span style="color:#000000;">) </span><span style="color:#000000;">=</span><span style="color:#000000;"> True AndAlso _
        Dts.Variables.Contains(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::CheckFile</span><span style="color:#800000;">"</span><span style="color:#000000;">) </span><span style="color:#000000;">=</span><span style="color:#000000;"> True Then
            fileLoc </span><span style="color:#000000;">=</span><span style="color:#000000;"> CStr(Dts.Variables(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::FFDataPath</span><span style="color:#800000;">"</span><span style="color:#000000;">).Value)
            fileName </span><span style="color:#000000;">=</span><span style="color:#000000;"> CStr(Dts.Variables.Item(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::CheckFile</span><span style="color:#800000;">"</span><span style="color:#000000;">).Value)
            </span><span style="color:#800000;">'</span><span style="color:#800000;">debug System.Windows.Forms.MessageBox.Show("FileDir:" + fileLoc + "FileName:" + fileName)</span><span style="color:#800000;">
</span><span style="color:#000000;">            If File.Exists(fileLoc </span><span style="color:#000000;">+</span><span style="color:#000000;"> fileName) Then
                Dts.Variables.Item(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::CheckFileExists</span><span style="color:#800000;">"</span><span style="color:#000000;">).Value </span><span style="color:#000000;">=</span><span style="color:#000000;"> True
                </span><span style="color:#800000;">'</span><span style="color:#800000;">debug System.Windows.Forms.MessageBox.Show("File exists")</span><span style="color:#800000;">
</span><span style="color:#000000;">            Else
                Dts.Variables.Item(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::CheckFileExists</span><span style="color:#800000;">"</span><span style="color:#000000;">).Value </span><span style="color:#000000;">=</span><span style="color:#000000;"> False
                </span><span style="color:#800000;">'</span><span style="color:#800000;">debug System.Windows.Forms.MessageBox.Show("File not exists")</span><span style="color:#800000;">
</span><span style="color:#000000;">            End If
            Dts.TaskResult </span><span style="color:#000000;">=</span><span style="color:#000000;"> Dts.Results.Success
        Else
            Dts.TaskResult </span><span style="color:#000000;">=</span><span style="color:#000000;"> Dts.Results.Failure
        End If
    End Sub

End Class
</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>The script task is configured to execute the <em>Sleep</em> task based on the precedence constraint. This is defined by double clicking on the connector and setting the following:</p>
<p><a href="http://dichotic.files.wordpress.com/2009/10/capture2.jpg"><img style="display:inline;border-width:0;" title="Capture2" border="0" alt="Capture2" src="http://dichotic.files.wordpress.com/2009/10/capture2_thumb.jpg?w=244&#038;h=189" width="244" height="189" /></a> </p>
<h6></h6>
</p>
<h6>Definition: Sleep Script Task</h6>
<p>Configured to sleep or pause the process.</p>
<table border="1" cellspacing="0" cellpadding="1" width="491">
<tbody>
<tr>
<td valign="top" width="202"><font size="1">ReadOnlyVariables</font></td>
<td valign="top" width="287"><font size="1">User::SleepMinutes</font></td>
</tr>
<tr>
<td valign="top" width="203"><font size="1">ReadWriteVariables</font></td>
<td valign="top" width="287"><font size="1"></font></td>
</tr>
</tbody>
</table>
<p>The script task will then execute the following code:</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:f04b997d-a097-41e7-b2f4-d130b8b85d36" class="wlWriterEditableSmartContent">
<pre style="background-color:#EBEBEB;overflow:auto;font-family:Lucida Console;font-size:9px;"><span style="color:#000000;">Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

    </span><span style="color:#800000;">'</span><span style="color:#800000;"> The execution engine calls this method when the task executes.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> To access the object model, use the Dts object. Connections, variables, events,</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> and logging features are available as static members of the Dts class.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> </span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> To open Code and Text Editor Help, press F1.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> To open Object Browser, press Ctrl+Alt+J.</span><span style="color:#800000;">
</span><span style="color:#000000;">
    Public Sub Main()
        </span><span style="color:#800000;">'
</span><span style="color:#000000;">        </span><span style="color:#800000;">'</span><span style="color:#800000;"> Zack Bethem @ AmberLeaf</span><span style="color:#800000;">
</span><span style="color:#000000;">        </span><span style="color:#800000;">'</span><span style="color:#800000;"> Based on: http://blogs.pragmaticworks.com/mike_davis/2009/06/make-an-ssis-package-delay-or-wait-for-data.html</span><span style="color:#800000;">
</span><span style="color:#000000;">        </span><span style="color:#800000;">'
</span><span style="color:#000000;">        If Dts.Variables.Contains(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::SleepMinutes</span><span style="color:#800000;">"</span><span style="color:#000000;">) </span><span style="color:#000000;">=</span><span style="color:#000000;"> True Then
            Dim min As Double </span><span style="color:#000000;">=</span><span style="color:#000000;"> Convert.ToDouble(Dts.Variables(</span><span style="color:#800000;">"</span><span style="color:#800000;">SleepMinutes</span><span style="color:#800000;">"</span><span style="color:#000000;">).Value) </span><span style="color:#000000;">*</span><span style="color:#000000;"> </span><span style="color:#800080;">60</span><span style="color:#000000;">
            Dim ms As Int32 </span><span style="color:#000000;">=</span><span style="color:#000000;"> Convert.ToInt32(min </span><span style="color:#000000;">*</span><span style="color:#000000;"> </span><span style="color:#800080;">1000</span><span style="color:#000000;">)
            System.Threading.Thread.Sleep(ms)

            Dts.TaskResult </span><span style="color:#000000;">=</span><span style="color:#000000;"> Dts.Results.Success
        Else
            Dts.TaskResult </span><span style="color:#000000;">=</span><span style="color:#000000;"> Dts.Results.Failure
        End If

    End Sub

End Class</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The For Loop container is configured to execute the <em>Move CheckFile </em>task based on the precedence constraint. This is defined by double clicking on the connector and setting the following:</p>
<p><a href="http://dichotic.files.wordpress.com/2009/10/capture3.jpg"><img style="display:inline;border-width:0;" title="Capture3" border="0" alt="Capture3" src="http://dichotic.files.wordpress.com/2009/10/capture3_thumb.jpg?w=244&#038;h=188" width="244" height="188" /></a></p>
<h6>Definition: Move CheckFile Script Task</h6>
<p>Configured to move the 0-byte handoff file to an Archive location with the appended suffix of the date in <em>yyyyMMddHH</em> format.</p>
<table border="1" cellspacing="0" cellpadding="1" width="491">
<tbody>
<tr>
<td valign="top" width="202"><font size="1">ReadOnlyVariables</font></td>
<td valign="top" width="287"><font size="1">User::CheckFile,User::FFDataPath,User::FFArchivePath</font></td>
</tr>
<tr>
<td valign="top" width="203"><font size="1">ReadWriteVariables</font></td>
<td valign="top" width="287"><font size="1"></font></td>
</tr>
</tbody>
</table>
<p>The script task will then execute the following code:</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:79edb7b6-703f-4d1b-a4a0-3c011b4dae4d" class="wlWriterEditableSmartContent">
<pre style="background-color:#EBEBEB;overflow:auto;font-family:Lucida Console;font-size:9px;"><span style="color:#000000;">Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.IO

Public Class ScriptMain

    </span><span style="color:#800000;">'</span><span style="color:#800000;"> The execution engine calls this method when the task executes.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> To access the object model, use the Dts object. Connections, variables, events,</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> and logging features are available as static members of the Dts class.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> </span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> To open Code and Text Editor Help, press F1.</span><span style="color:#800000;">
</span><span style="color:#000000;">    </span><span style="color:#800000;">'</span><span style="color:#800000;"> To open Object Browser, press Ctrl+Alt+J.</span><span style="color:#800000;">
</span><span style="color:#000000;">
    Public Sub Main()
        </span><span style="color:#800000;">'
</span><span style="color:#000000;">        </span><span style="color:#800000;">'</span><span style="color:#800000;">check if vars exist</span><span style="color:#800000;">
</span><span style="color:#000000;">        If Dts.Variables.Contains(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::CheckFile</span><span style="color:#800000;">"</span><span style="color:#000000;">) </span><span style="color:#000000;">=</span><span style="color:#000000;"> True AndAlso _
        Dts.Variables.Contains(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::FFDataPath</span><span style="color:#800000;">"</span><span style="color:#000000;">) </span><span style="color:#000000;">=</span><span style="color:#000000;"> True AndAlso _
        Dts.Variables.Contains(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::FFArchivePath</span><span style="color:#800000;">"</span><span style="color:#000000;">) </span><span style="color:#000000;">=</span><span style="color:#000000;"> True Then

            Dim srcFile, tgtFile, tgtFileName, searchStr As String

            srcFile </span><span style="color:#000000;">=</span><span style="color:#000000;"> CStr(Dts.Variables(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::FFDataPath</span><span style="color:#800000;">"</span><span style="color:#000000;">).Value) </span><span style="color:#000000;">+</span><span style="color:#000000;"> _
            CStr(Dts.Variables(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::CheckFile</span><span style="color:#800000;">"</span><span style="color:#000000;">).Value)

            tgtFileName </span><span style="color:#000000;">=</span><span style="color:#000000;"> CStr(Dts.Variables(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::CheckFile</span><span style="color:#800000;">"</span><span style="color:#000000;">).Value)

            </span><span style="color:#800000;">'</span><span style="color:#800000;">add a datastamp on handoff file</span><span style="color:#800000;">
</span><span style="color:#000000;">            tgtFileName </span><span style="color:#000000;">=</span><span style="color:#000000;"> Left$(tgtFileName, InStrRev(tgtFileName, </span><span style="color:#800000;">"</span><span style="color:#800000;">.</span><span style="color:#800000;">"</span><span style="color:#000000;">) </span><span style="color:#000000;">-</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">) </span><span style="color:#000000;">+</span><span style="color:#000000;"> _
            </span><span style="color:#800000;">"</span><span style="color:#800000;">_</span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#000000;">+</span><span style="color:#000000;"> CStr(Format(Now, </span><span style="color:#800000;">"</span><span style="color:#800000;">yyyyMMddHH</span><span style="color:#800000;">"</span><span style="color:#000000;">)) </span><span style="color:#000000;">+</span><span style="color:#000000;"> _
            Mid(tgtFileName, InStrRev(tgtFileName, </span><span style="color:#800000;">"</span><span style="color:#800000;">.</span><span style="color:#800000;">"</span><span style="color:#000000;">))

            </span><span style="color:#800000;">'</span><span style="color:#800000;">System.Windows.Forms.MessageBox.Show(tgtFileName)</span><span style="color:#800000;">
</span><span style="color:#000000;">
            tgtFile </span><span style="color:#000000;">=</span><span style="color:#000000;"> CStr(Dts.Variables(</span><span style="color:#800000;">"</span><span style="color:#800000;">User::FFArchivePath</span><span style="color:#800000;">"</span><span style="color:#000000;">).Value) </span><span style="color:#000000;">+</span><span style="color:#000000;"> tgtFileName

            </span><span style="color:#800000;">'</span><span style="color:#800000;">System.Windows.Forms.MessageBox.Show(tgtFile)</span><span style="color:#800000;">
</span><span style="color:#000000;">
            Try
                File.Move(srcFile, tgtFile)
                Dts.Events.FireInformation(</span><span style="color:#800080;">0</span><span style="color:#000000;">, </span><span style="color:#800000;">""</span><span style="color:#000000;">, </span><span style="color:#800000;">"</span><span style="color:#800000;">File moved to: </span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#000000;">+</span><span style="color:#000000;"> tgtFile, </span><span style="color:#800000;">""</span><span style="color:#000000;">, </span><span style="color:#800080;">0</span><span style="color:#000000;">, True)
                Dts.TaskResult </span><span style="color:#000000;">=</span><span style="color:#000000;"> Dts.Results.Success
            Catch ex As Exception
                Dts.Events.FireInformation(</span><span style="color:#800080;">1</span><span style="color:#000000;">, </span><span style="color:#800000;">""</span><span style="color:#000000;">, </span><span style="color:#800000;">"</span><span style="color:#800000;">File move failure. Tried to move to: </span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#000000;">+</span><span style="color:#000000;"> tgtFile, </span><span style="color:#800000;">""</span><span style="color:#000000;">, </span><span style="color:#800080;">0</span><span style="color:#000000;">, False)
                Dts.TaskResult </span><span style="color:#000000;">=</span><span style="color:#000000;"> Dts.Results.Failure
            End Try

        End If

    End Sub

End Class
</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=69&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2009/10/20/ssis-waiting-for-a-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>

		<media:content url="http://dichotic.files.wordpress.com/2009/10/capture_thumb.jpg" medium="image">
			<media:title type="html">Control Flow</media:title>
		</media:content>

		<media:content url="http://dichotic.files.wordpress.com/2009/10/capture2_thumb.jpg" medium="image">
			<media:title type="html">Capture2</media:title>
		</media:content>

		<media:content url="http://dichotic.files.wordpress.com/2009/10/capture3_thumb.jpg" medium="image">
			<media:title type="html">Capture3</media:title>
		</media:content>
	</item>
		<item>
		<title>Using XML datatype to parse comma-delimited columns</title>
		<link>http://dichotic.wordpress.com/2009/07/15/using-xml-datatype-to-parse-comma-delimited-columns/</link>
		<comments>http://dichotic.wordpress.com/2009/07/15/using-xml-datatype-to-parse-comma-delimited-columns/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 05:20:15 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/?p=59</guid>
		<description><![CDATA[This was the coolest trick I&#8217;ve seen in a while.
Problem: need to parse a comma delimited file

	select email
		, Split.a.value('.','Varchar(50)') as kid_age
		, row_number() over (partition by email order by email) as row_cnt
	from (
		select email
 			, cast('' + REPLACE(kid_age,',','') + '' as xml) as kid_age
		from stg_profile_data ) x
	cross apply kid_age.nodes('/M') split(a)

Mucho thanks to where Google found it
 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=59&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This was the coolest trick I&#8217;ve seen in a while.<br />
<strong>Problem:</strong> need to parse a comma delimited file</p>
<p><code><br />
	select email<br />
		, Split.a.value('.','Varchar(50)') as kid_age<br />
		, row_number() over (partition by email order by email) as row_cnt<br />
	from (<br />
		select email<br />
 			, cast('' + REPLACE(kid_age,',','') + '' as xml) as kid_age<br />
		from stg_profile_data ) x<br />
	cross apply kid_age.nodes('/M') split(a)<br />
</code></p>
<p>Mucho thanks to where Google found <a href="http://mangalpardeshi.blogspot.com/2009/03/how-to-split-comma-delimited-string.html">it</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=59&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2009/07/15/using-xml-datatype-to-parse-comma-delimited-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>
	</item>
		<item>
		<title>I Heart Unix</title>
		<link>http://dichotic.wordpress.com/2009/07/03/i-heart-unix/</link>
		<comments>http://dichotic.wordpress.com/2009/07/03/i-heart-unix/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 19:35:56 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/?p=57</guid>
		<description><![CDATA[Use SED to get rid of those nasty empty lines in a text file:

sed '/^$/ d' someFile &#62; someNewFile
mv someNewFile someFile

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=57&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Use SED to get rid of those nasty empty lines in a text file:<br />
<code><br />
sed '/^$/ d' someFile &gt; someNewFile<br />
mv someNewFile someFile<br />
</code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=57&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2009/07/03/i-heart-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL&#8217;s version of SQL*Loader</title>
		<link>http://dichotic.wordpress.com/2009/06/07/mysqls-version-of-sqlloader/</link>
		<comments>http://dichotic.wordpress.com/2009/06/07/mysqls-version-of-sqlloader/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 20:51:24 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/?p=55</guid>
		<description><![CDATA[Just found the nice command built into MySQL to load data files. It couldn&#8217;t have been simpler to use. Just be sure to through the right newline. Using &#8216;\r\n&#8217; worked for a file generated in SSIS in my case.
LOAD DATA [LOW_PRIORITY &#124; CONCURRENT] [LOCAL] INFILE 'file_name'
    [REPLACE &#124; IGNORE]
    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=55&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just found the nice command built into MySQL to load data files. It couldn&#8217;t have been simpler to use. Just be sure to through the right newline. Using &#8216;\r\n&#8217; worked for a file generated in SSIS in my case.<br />
<code>LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name'<br />
    [REPLACE | IGNORE]<br />
    INTO TABLE tbl_name<br />
    [CHARACTER SET charset_name]<br />
    [{FIELDS | COLUMNS}<br />
        [TERMINATED BY 'string']<br />
        [[OPTIONALLY] ENCLOSED BY 'char']<br />
        [ESCAPED BY 'char']<br />
    ]<br />
    [LINES<br />
        [STARTING BY 'string']<br />
        [TERMINATED BY 'string']<br />
    ]<br />
    [IGNORE number LINES]<br />
    [(col_name_or_user_var,...)]<br />
    [SET col_name = expr,...]<br />
</code></p>
<p>See more magic <a href="http://dev.mysql.com/doc/refman/5.1/en/load-data.html">here</a> from the MySQL manual.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=55&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2009/06/07/mysqls-version-of-sqlloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamicallly build URLs in RightNow</title>
		<link>http://dichotic.wordpress.com/2009/04/23/dynamicallly-build-urls-in-rightnow/</link>
		<comments>http://dichotic.wordpress.com/2009/04/23/dynamicallly-build-urls-in-rightnow/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 00:43:25 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/?p=53</guid>
		<description><![CDATA[I always forget this, despite it being one of the most important features.
If you want to build a tab, that can pass a value from a custom field in RightNow as part of the parameter you can do it as follows:

$p_ccf_ &#8212; use with contact custom fields
$p_orgcf_ &#8212; use with organization custom fields
$p_icf_ &#8212; use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=53&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I always forget this, despite it being one of the most important features.</p>
<p>If you want to build a tab, that can pass a value from a custom field in RightNow as part of the parameter you can do it as follows:</p>
<ul>
<li>$p_ccf_ &#8212; use with contact custom fields</li>
<li>$p_orgcf_ &#8212; use with organization custom fields</li>
<li>$p_icf_ &#8212; use with incident custom fields</li>
<li>$p_acf_ &#8212; use with answer custom fields</li>
<li>$p_spcf_ &#8212; use with sales product custom fields</li>
<li>$p_ocf_ &#8212; use with opportunity custom fields</li>
</ul>
<p>Why would the &#8220;H&#8221; would one do this? Think of it this way. Client ABC has an existing portal that uses friendly URLs (like Ruby on Rails). So if I had an account-id custom field on an organization, I could pass that value and the web page shown in the control would present information pertinent to that account-id (aka. organization). HUGE savings.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=53&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2009/04/23/dynamicallly-build-urls-in-rightnow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>
	</item>
		<item>
		<title>Turn a WSDL to a referenceable DLL</title>
		<link>http://dichotic.wordpress.com/2009/04/20/turn-a-wsdl-to-a-referenceable-dll/</link>
		<comments>http://dichotic.wordpress.com/2009/04/20/turn-a-wsdl-to-a-referenceable-dll/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 16:57:35 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/?p=50</guid>
		<description><![CDATA[Found this will surfing the intertubes. I&#8217;m using it to build my first Webservice integration into RightNow using their desktop integration API.
Here were my steps in creating the dll.

Turn the WSDL into buildable, C-Sharp code
"C:\Program Files\Microsoft SDKs\Windows\v6.0a\bin\wsdl.exe" /l:cs /protocol:SOAP https://www.penproplus.com/pppwebservice/pppwebservice.asmx?WSDL
Compile the C-Sharp code into a referenceable DLL
c:\windows\microsoft.net\Framework\v3.5\csc /t:library /r:System.Web.Services.dll /r:System.Xml.dll PPPWebServices.cs
I had a couple of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=50&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Found <a href="http://gsraj.tripod.com/dotnet/webservices/webservice_csharp_client.html">this</a> will surfing the intertubes. I&#8217;m using it to build my first Webservice integration into RightNow using their desktop integration API.</p>
<p>Here were my steps in creating the dll.</p>
<ol>
<li>Turn the WSDL into buildable, C-Sharp code</li>
<p><code>"C:\Program Files\Microsoft SDKs\Windows\v6.0a\bin\wsdl.exe" /l:cs /protocol:SOAP https://www.penproplus.com/pppwebservice/pppwebservice.asmx?WSDL</code></p>
<li>Compile the C-Sharp code into a referenceable DLL</li>
<p><code>c:\windows\microsoft.net\Framework\v3.5\csc /t:library /r:System.Web.Services.dll /r:System.Xml.dll PPPWebServices.cs</code></ol>
<blockquote><p>I had a couple of wonky path issues when running these commands. I had to make sure I was running the CSC compiler from the .Net Framework directory. Otherwise, I get some complaints about missing dlls and other grumpy messages</p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=50&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2009/04/20/turn-a-wsdl-to-a-referenceable-dll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>
	</item>
		<item>
		<title>RightNow Desktop Integration .. it begins</title>
		<link>http://dichotic.wordpress.com/2009/02/23/rightnow-desktop-integration-it-begins/</link>
		<comments>http://dichotic.wordpress.com/2009/02/23/rightnow-desktop-integration-it-begins/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 17:39:30 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/?p=47</guid>
		<description><![CDATA[I&#8217;ve started exploring the new capabilities of RightNow desktop integration. It looks to be quite powerful, assuming I can get my hacking skills around it.
Unit testing code is a pain with the integration API. Each change requires a restart of RightNow. That can take a while, even with a fast connection &#38; computer.
One recommendation, however, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=47&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve started exploring the new capabilities of RightNow desktop integration. It looks to be quite powerful, assuming I can get my hacking skills around it.</p>
<p>Unit testing code is a pain with the integration API. Each change requires a restart of RightNow. That can take a while, even with a fast connection &amp; computer.</p>
<p>One recommendation, however, is to add the following in the project&#8217;s Post-build event. This will automatically deploy the new compiled dll and move it to the proper directory for development testing. It should be part of the default set of templates, but it isn&#8217;t.</p>
<p><code>mkdir "%USERPROFILE%\RightNowDev"<br />
mkdir "%USERPROFILE%\RightNowDev\AddIns"<br />
mkdir "%USERPROFILE%\RightNowDev\AddIns\$(ProjectName)"<br />
copy /Y "$(TargetDir)$(TargetName).*" "%USERPROFILE%\RightNowDev\AddIns\$(ProjectName)\"</code></p>
<p>Great stuff.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=47&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2009/02/23/rightnow-desktop-integration-it-begins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>
	</item>
		<item>
		<title>RNOWOrganization &#8211; how to add a parent?</title>
		<link>http://dichotic.wordpress.com/2009/01/28/rnoworganization-add-parent/</link>
		<comments>http://dichotic.wordpress.com/2009/01/28/rnoworganization-add-parent/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 04:04:19 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[RightNow]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/?p=34</guid>
		<description><![CDATA[I&#8217;m still working with hacking my way through C#. The latest stumbling block is adding an organization with an associated parent organization. The end result would look like the following within RightNow:

To date, I have the following code using the RNOW Data Connection API
// set parent org
if (Convert.ToString(row[38]) != "")
{
int z = getXrefId(Convert.ToString(row[38]), tblXrefIds);
if (z [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=34&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m still working with hacking my way through C#. The latest stumbling block is adding an organization with an associated parent organization. The end result would look like the following within RightNow:<br />
<img class="alignnone size-medium wp-image-35" title="Hierarchy" src="http://dichotic.files.wordpress.com/2009/01/croppercapture7.png?w=300&#038;h=242" alt="Hierarchy" width="300" height="242" /></p>
<p>To date, I have the following code using the RNOW Data Connection API</p>
<p><code>// set parent org<br />
if (Convert.ToString(row[38]) != "")<br />
{<br />
int z = getXrefId(Convert.ToString(row[38]), tblXrefIds);<br />
if (z != 0)<br />
{<br />
RNOWOrganization parentOrg = new RNOWOrganization(z);<br />
List parentOrgs = new List();<br />
parentOrgs.Add(parentOrg.ID);<br />
myOrg.Parent = parentOrgs;<br />
}<br />
else<br />
{<br />
//log error<br />
}<br />
}</code></p>
<p>The current question? The code syntax <code>'myOrg.Parent = parentOrgs;'</code> doesn&#8217;t work. Instead, I get the error:<br />
<em>Cannot implicitly convert type &#8216;System.Collections.Generic.List&lt;int&gt;&#8217; to &#8216;System.Collections.Generic.List&lt;int?&gt;&#8217;</em></p>
<p>Seems same to me.</p>
<p>Argh!!! Why can it just be a single Integer representing the ID of the organization. A list to set a single parent? What for? Make it simple stupid. The head scratching continues.</p>
<blockquote><p><em>Update</em></p>
<p>Turns out C# provides a way to define a nullable list of collections. This is defined by the &#8216;?&#8217; notation. So, parentOrgs in the code snippet above had to be defined by:</p>
<p><code>List&lt;int?&gt; parentOrgs = new List&lt;int?&gt;();</code><br />
Defining the hierarchy is still not working 100%, but this hurdle is hopped over.</p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=34&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2009/01/28/rnoworganization-add-parent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>

		<media:content url="http://dichotic.files.wordpress.com/2009/01/croppercapture7.png?w=300" medium="image">
			<media:title type="html">Hierarchy</media:title>
		</media:content>
	</item>
		<item>
		<title>RightNow Connect DLL</title>
		<link>http://dichotic.wordpress.com/2009/01/07/rightnow-connect-dll/</link>
		<comments>http://dichotic.wordpress.com/2009/01/07/rightnow-connect-dll/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 02:55:17 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[RightNow]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/?p=32</guid>
		<description><![CDATA[I&#8217;ve found myself doing some .Net coding these days. A rest from Ruby on Rails (which is friggin&#8217; awesome). 
When using the RightNow Connect DLL I always would get the most common error of all..
&#8220;Invalid Server Version. Server &#8216; &#8216;. Connect &#8216;8.5.0.127&#8242;.&#8221;
Scratching my head. I closed the new solution in Visual Studio, which caused the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=32&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve found myself doing some .Net coding these days. A rest from Ruby on Rails (which is friggin&#8217; awesome). </p>
<p>When using the RightNow Connect DLL I always would get the most common error of all..</p>
<p>&#8220;Invalid Server Version. Server &#8216; &#8216;. Connect &#8216;8.5.0.127&#8242;.&#8221;</p>
<p>Scratching my head. I closed the new solution in Visual Studio, which caused the solution&#8217;s folder structure to be created. After reopening it and re-pointing the reference to the RightNow Connect DLL.  Things seem to work. No problems with that A-N-N-O-Y-I-N-G &#8220;invalid server version&#8221; message. Viola! It works. Good enough.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=32&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2009/01/07/rightnow-connect-dll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>
	</item>
		<item>
		<title>And now for something completely different&#8230;mongrel</title>
		<link>http://dichotic.wordpress.com/2008/12/09/and-now-for-something-completely-different-mongrel/</link>
		<comments>http://dichotic.wordpress.com/2008/12/09/and-now-for-something-completely-different-mongrel/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 23:11:07 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dichotic.wordpress.com/?p=29</guid>
		<description><![CDATA[I&#8217;ve been switching gears lately. I&#8217;m not riding the ruby rails or trying to at least.
Thanks to this entry, I&#8217;m finally up and running. I&#8217;ll probably need this in the future, so I&#8217;m saving it for future reference. Thanks for the post.
Configure the Mongrel Cluster
mongrel_rails cluster::configure -e production -p 8000 -N 2 -c /home/railsuser/rails/appname -a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=29&subd=dichotic&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been switching gears lately. I&#8217;m not riding the ruby rails or trying to at least.</p>
<p>Thanks to this entry, I&#8217;m finally up and running. I&#8217;ll probably need this in the future, so I&#8217;m saving it for future reference. Thanks for the <a href="http://www.ecogito.net/anil/2007/11/howto-setup-ror-mongrel-and-apache-on.html" target="_self">post</a>.</p>
<p><code>Configure the Mongrel Cluster<br />
<span style="color:#006600;font-family:courier new;">mongrel_rails cluster::configure -e production -p 8000 -N 2 -c /home/railsuser/rails/appname -a 127.0.0.1</span><br />
A note about this:<br />
<span style="color:#006600;font-family:courier new;">-N 2 </span>: Two instances of Mongrel will be started up as part of this cluster<br />
<span style="color:#006600;font-family:courier new;">-p 8000</span>: The Mongrel instances will listen at ports starting at 8000 (i.e. 8000 and 8001)<br />
/home/railsuser/rails/appname : Path to the folder where your Rails app resides<br />
<span style="color:#006600;font-family:courier new;">-a 127.0.0.1</span> : This restricts access to localhost.<br />
</code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dichotic.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dichotic.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dichotic.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dichotic.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dichotic.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dichotic.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dichotic.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dichotic.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dichotic.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dichotic.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dichotic.wordpress.com&blog=419338&post=29&subd=dichotic&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dichotic.wordpress.com/2008/12/09/and-now-for-something-completely-different-mongrel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24acb127dc2f6cc4f5b4e9ad2ca967f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zack</media:title>
		</media:content>
	</item>
	</channel>
</rss>