July 25, 2005 at 4:29 pm
I have created a DTS package which get the source files dynamically from a remote location. The source file name change as per the system date. I have uploaded my package to the Development server from the local server. I can execute the package by right click -> execute package and it populates the tables but if i schedule and run the package, i am getting error message.
I am not sure about the problem because it is successful runs and populates when i execute. Can anybody help me on this?
Yeshwanth
This is a ActiveX script i use in the WorkFlow properties of the transformation task.
Option Explicit
Function Main()
Dim oPkg, oDataPump, oPkg1, cn
Dim sSourceTable, sDestinationTable
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set oPKG1= DTSGlobalVariables.Parent
Set cn = oPKG1.Connections("INCREMENTAL_PUMP")
cn.DataSource = "J:\pidinc" & GetDate((Now-1)) & ".dat"
If (not(FSO.FileExists(cn.DataSource))) then
If WeekdayName( Weekday(Now) ) = "Monday" Then
Main = DTSStepScriptResult_DontExecuteTask
End if
Else
sSourceTable = cn.datasource
sDestinationTable = "[T_RPI_INCREMENTAL_REPORTS]"
Set oPkg = DTSGlobalVariables.Parent
Set oDataPump = oPkg.Tasks("DTSTask_DTSDataPumpTask_2").CustomTask
oDataPump.SourceObjectName = sSourceTable
oDataPump.DestinationObjectName = sDestinationTable
Set oDataPump = Nothing
Set oPkg = Nothing
Main = DTSTaskExecResult_Success
End if
End Function
Function GetDate(dDate)
Dim sYear, sMonth, sDay
sYear = Year(dDate)
sMonth = Month(dDate)
If sMonth < 10 Then sMonth = "0" & sMonth
sDay = Day(dDate)
If sDay < 10 Then sDay = "0" & sDay
GetDate = sYear & sMonth & sDay
End Function
July 25, 2005 at 6:28 pm
Would it be possible for you to provide the error message ?
Might be a little helpful in determining what the problem is ![]()
--------------------
Colt 45 - the original point and click interface ![]()
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply