September 20, 2002 at 7:56 am
I have the following VB Script in an ActiveX step for DTS. The script simply uses FSO to move a bak fime from one server to the other. The file gets copied, but the step never terminates... it hangs. I have the code below:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim objFSO, strFullNm, strDestination, File
Set objFSO = CreateObject ("Scripting.FileSystemObject")
strFullNm =DTSGlobalVariables("gvFilePathRoot").Value & _
"ep.bak"
strDestination = DTSGlobalVariables("gvDestinationPath").Value
If objFSO.FileExists(strFullNm) Then
objFSO.MoveFile strFullNm, strDestination
Else
Main = DTSTaskExecResult_Failure
Exit Function
End If
Set objFSO = nothing
Main = DTSTaskExecResult_Success
End Function
-JG
-JG
September 20, 2002 at 8:52 am
Code looks ok and ran ok on my machine. Not sure what could be going wrong.
Are there other steps b4/after this one that could be causing or contributing to the hangup?
September 23, 2002 at 5:11 am
Also did you check to make sure the file was copied? And how big is the file and network speed? Have you tested a copy by hand to see the time.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
September 23, 2002 at 8:34 am
It does perform the copy. And the file size is the same. Something is not being passed becaused I used the coiped bak file and it will not restore properly to the dbase. But the original one restores fine. And the step never completes it just hangs.
-JG
-JG
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply