Database Reference
In-Depth Information
sMsg, "", 0, True)
If bDebug Then MsgBox(sMsg)
' 6: check if the file is in use...
While FileInUse(sExtractFilePath)
' 6a: if file is in use, sleep for a second...
System.Threading.Thread.Sleep(1000)
' 6b: incrementor...
s += 1
' 6c: if incrementor reaches 10 (10 seconds),
If s > 10 Then
' exit the loop...
Exit While
End If 's > 10
End While 'FileInUse(sExtractFilePath)
' 7: log...
If s = 1 Then
sMsg = "File was in use " & s.ToString & "
time."
Else ' s = 1
sMsg = "File was in use " & s.ToString & "
times."
End If ' s = 1
Dts.Events.FireInformation(0, sSubComponent,
sMsg, "", 0, True)
If bDebug Then MsgBox(sMsg)
' 8: if the file exists...
If File.Exists(sExtractFilePath) Then
Try
' 8a: open it for append, encoded as
built, using a streamwriter...
Dim writer As StreamWriter = New
StreamWriter(sExtractFilePath, True, _
Encoding.Default)
' 8b: add the footer row...
writer.WriteLine(sFooterRow)
' 8c: clean up...
Search WWH ::




Custom Search