SQL Server - SSIS question - Asked By Rosie Buchanan on 10-Feb-12 02:47 PM

Could someone please explain what this is doing?

Public Class ScriptMain

' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections, variables, events,
' and logging features are available as static members of the Dts class.
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.

Public Sub Main()
Dim fi As System.IO.FileInfo
fi = New System.IO.FileInfo("\\PhXfer\downloads$\Offsets\SSIDiaries.txt")
If fi.LastWriteTime.Date = DateTime.Today Then
Dts.TaskResult = Dts.Results.Success
Dts.TaskResult = Dts.Results.Failure
End If

End Sub
Robbe Morris replied to Rosie Buchanan on 10-Feb-12 03:22 PM
It is checking to see if the output file from a data transformation service job in SQL Server has written out an SSIDiaries.txt file for today.

System.IO is the namespace used for file, directory information in windows (along with streams).
Rosie Buchanan replied to Robbe Morris on 10-Feb-12 07:43 PM
Thank you!!!!