April 18, 2003 at 5:43 am
Hi,
I'm new to DTS..
My configuration is:-Windows 2000 server
-Windows 2000 SQL server
-No VBHost (?)
1)
I schedule a package that contains the following ActiveX Script task:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
dim oFile
dim x
dim strInputFile
strInputFile="C:\Training\Start_End_Dates.txt"
set ofile = createobject("scripting.filesystemobject")
set x= oFile.opentextfile(strInputFile)
DTSglobalvariables("StartDate").value=x.readline
DTSglobalvariables("EndDate").value=x.readline
x.close
Main = DTSTaskExecResult_Success
End Function
When I run this I get this message:
Executed as user: ...\SYSTEM. DTSRun: Loading... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSActiveScriptTask_1 DTSRun OnError: DTSStep_DTSActiveScriptTask_1, Error = -2147220482 (800403FE) Error string: Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: File not found Error on Line 13 Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 4500 Error Detail Records: Error: -2147220482 (800403FE); Provider Error: 0 (0) Error string: Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: File not found Error on Line 13 Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 4500 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1 DTSRun: Package execution complete. Process Exit Code 1. The step failed.
If you know that the file resides on the machine the SQL server is running on, how is it possible that I get the message FILE NOT FOUND ???
2)
I schedule a package that contains the following ActiveX Script task:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Option Explicit
Function Main()
dim oFile
dim strInputFile
strInputFile="C:\Pull_00.txt"
set oFile = CreateObject("Scripting.FileSystemObject")
'if oFile.FileExists(strInputFile) Then
DTSglobalvariables("Counter").value=1
Main = DTSTaskExecResult_Success
'End if
'DTSglobalvariables("Counter").value=0
'Main = DTSTaskExecResult_Failure
'End if
set oFile = nothing
'Main = DTSTaskExecResult_Success
End Function
Knowing that the file resides on the machine where SQL server 2000 is running.
My global variable is not updated to one even if the file exists...
Can any body explain this to me...
It would be a great help...
Thanks in advance
Regards,
Bart
April 18, 2003 at 8:25 am
Does the user account under which the package is being executed have rights to access the folder in which the file resides? This sounds like a permissions problem. If the user account under which the package is being executed does not have authority to access the contents of the folder in which your file resides, the package won't be able to open the file or read it.
hth,
Michael
Michael Weiss
Michael Weiss
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply