Last Post 21 May 2002 11:21 AM by Gordowey. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Gordowey
New Member
New Member

--
21 May 2002 11:21 AM
Well if i understood right you are using a DTS to export from a table to a text file containing the last backup (last period, day, week...) and you want to append it to the file containing the back up of the current month, right??

Let´s say:
"bkp_tmp.txt": is the file with the current backup data (last period)
and "DTSGlobalVariables("BkPFile").Value" contains the name of the file of the current month.

At the end of your process you can put a "Activex Script task" to append one file into another. See below


Alberto




'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateFalse = 0
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")

Set f = fs.OpenTextFile("c:\bkp_tmp.txt", ForReading, TristateFalse)
bkp_tmp = f.ReadAll

Set f = fs.OpenTextFile(DTSGlobalVariables("BkPFile").Value, ForAppending, TristateFalse)
f.Write bkp_tmp
f.Close
Main = DTSTaskExecResult_Success
End Function
You are not authorized to post a reply.

Acceptable Use Policy