Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dynamic DTS Connector (Text File)

0 views
Skip to first unread message

Leland Barnes

unread,
Jul 14, 1999, 3:00:00 AM7/14/99
to
Greetings,

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


Davy Ramirez

unread,
Jul 15, 1999, 3:00:00 AM7/15/99
to
Hi,
Try to use, change, the following code in an ActiveX script.
I can change the name of a connection file.

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

0 new messages