![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How do I apply the import a new file created each day to a DTS package? Listed below is the information from SQLDTS website. But I do not understand how to apply this to my DTS package. I created by click on Text File (Source) the properties Existing (Text File (Source)), DataSource(Text File ), File Name: Please help me this problem. Thanks, Mark http://www.sqldts.com/default.aspx?200 ' Pkg 200 Option Explicit Function Main() Dim oConn, sFilename ' Filename format - exyymmdd.log sFilename = "ex" & Right(Year(Now()), 2) If Month(Now()) < 10 Then sFilename = sFilename & "0" & _ Month(Now()) Else sFilename = sFilename & Month (Now()) If Day(Now()) < 10 Then sFilename = sFilename & _ "0" & Day(Now()) Else sFilename = sFilename & Day(Now()) sFilename = DTSGlobalVariables ("LogFilePath").Value & _ sFilename & ".log" Set oConn = DTSGlobalVariables.Parent.Connections ("Text File (Source)") oConn.DataSource = sFilename Set oConn = Nothing Main = DTSTaskExecResult_Success End Function |
#3
| |||
| |||
|
|
You'll need to specify a name for your text file and a specific location. Build your DTS package specifying the file name and location, then you'll need to replace the file (I've used FTP), and schedule your DTS update to run after the text file is replaced. Steve "Mark" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:27e3c01c46453$d9946220$a601280a (AT) phx (DOT) gbl... How do I apply the import a new file created each day to a DTS package? Listed below is the information from SQLDTS website. But I do not understand how to apply this to my DTS package. I created by click on Text File (Source) the properties Existing (Text File (Source)), DataSource(Text File ), File Name: Please help me this problem. Thanks, Mark http://www.sqldts.com/default.aspx?200 ' Pkg 200 Option Explicit Function Main() Dim oConn, sFilename ' Filename format - exyymmdd.log sFilename = "ex" & Right(Year(Now()), 2) If Month(Now()) < 10 Then sFilename = sFilename & "0" & _ Month(Now()) Else sFilename = sFilename & Month (Now()) If Day(Now()) < 10 Then sFilename = sFilename & _ "0" & Day(Now()) Else sFilename = sFilename & Day(Now()) sFilename = DTSGlobalVariables ("LogFilePath").Value & _ sFilename & ".log" Set oConn = DTSGlobalVariables.Parent.Connections ("Text File (Source)") oConn.DataSource = sFilename Set oConn = Nothing Main = DTSTaskExecResult_Success End Function |
![]() |
| Thread Tools | |
| Display Modes | |
| |