I am using SQL Server 7.0 to process our log entries from our Proxy Server.
To manage the size of the database, I created a DTS package to export all of
the log entries for one week to a text file. While creating the DTS
package, a connector was created for my text file WeeklyLogs.Txt.
My question is....
Rather than having a static text filename, WeeklyLogs.txt, I would like to
have a more dynamic filename, something like WE_7-10-1999.TXT, for Week
Ending July 10th, 1999.
Anyone know how I can change the DTS package so that I can create the
dynamic export files?
Thanks,
Leland Barnes
Network Administrator
Cleveland Metroparks
l...@clevelandmetroparks.com
Hope it helps.
Davy Ramirez - LIKEWISE (PARIS)
Function Main
Dim oCurConnection
Dim oPackage
Set oPackage = DTSGlobalVariables.Parent
For Each oCurConnection In oPackage.Connections
If oCurConnection.Name = "Text File (Destination)" Then
msgbox "Old Name : " & oCurConnection.Datasource
' oCurConnection.Datasource = "c:\NewName.txt"
' the following statement create a file named with the current date
oCurConnection.Datasource = "c:\" & Month(Now) & "-" & Day(Now) & "-" &
Year(Now) & ".TXT"
Exit For
End If
Next
Main = DTSTaskExecResult_Success
End Function