Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB script hanging

Status
Not open for further replies.

jelf

Programmer
Mar 15, 2001
41
GB
We have a very large DTS package which runs without any problems most days but recently the package is hanging on the very first step(see script). Nothing is logged and the system appears to be running normally but the only way to get this step to complete is to reboot.

Does anyone have any ideas or pointers so that I can investigate the problem further?

Thanks.

John

ActiveX Script:

'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()
On Error Resume Next
Dim ThisPackage, ParentPackage, CurConnection, CurTask, XferTask

Set cLogger = CreateObject("GenDebug.ClsLogger")
cLogger.ModuleName = "CSDWS0L0_ControlMigration"

DTSGlobalVariables("ExecResult").value = DTSTaskExecResult_Success

DTSGlobalVariables("ErrorString").value = ""

DTSGlobalVariables("CurrErrorCnt").value = 0

if DTSGlobalVariables("Password").value = "<not displayable>" THEN DTSGlobalVariables("Password").value = ""

Set ThisPackage = DTSGlobalVariables.Parent
' Set ParentPackage = ThisPackage.Parent

' Set the server that all the connections are pointing to to the correct server for this environment
For Each CurConnection in ThisPackage.Connections
if Left (CurConnection.ProviderID, 8) = "SQLOLEDB" then
curconnection.DataSource = DTSGlobalVariables("Server").value
curconnection.UserID = DTSGlobalVariables("UserName").value
curconnection.Password = DTSGlobalVariables("Password").value

if Err.Number <> 0 then
CLogger.LogEvent "ActiveX Setup of Connection Values has FAILED ", , 1, "Setup of Connection Values within Package( CSDWS0L0_ControlMigration ) has FAILED."
Main = DTSTaskExecResult_Failure
end if
end if
Next


if Err.Number <> 0 then
CLogger.LogEvent "ActiveX Set Global Vars Failed ", , 1, "Setup of Global Var's Package( CSDWS0L0_ControlMigration )"
Main = DTSTaskExecResult_Failure
else
Main = DTSTaskExecResult_Success
end if

End Function


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top