Database Reference
In-Depth Information
writer.Flush()
' 8d: get out...
writer.Close()
' 8e: log...
sMsg = "File " & sExtractFilePath & "
exists and the footer row has " & _
"been appended."
Dts.Events.FireInformation(0,
sSubComponent, sMsg, "", 0, True)
If bDebug Then MsgBox(sMsg)
Catch ex As Exception
' 8f: log...
sMsg = "Issue with appending footer row
to " & sExtractFilePath & _
" file: " & ControlChars.CrLf & ex.Message
Dts.Events.FireInformation(0,
sSubComponent, sMsg, "", 0, True)
If bDebug Then MsgBox(sMsg)
End Try
Else
' 8g: log...
sMsg = "Cannot find file: " & sExtractFilePath
Dts.Events.FireInformation(0, sSubComponent,
sMsg, "", 0, True)
If bDebug Then MsgBox(sMsg)
End If ' File.Exists(sExtractFilePath)
' 9: return success...
Dts.TaskResult = ScriptResults.Success
End Sub
Then add the function from Listing 7-9 after Public Sub Main() .
Listing 7-9 . Code for the FileInUse Function
Function FileInUse(ByVal sFile As String) As Boolean
 
 
Search WWH ::




Custom Search