dbTalk Databases Forums  

ScriptPkg problems

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss ScriptPkg problems in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andy
 
Posts: n/a

Default ScriptPkg problems - 12-22-2003 , 09:04 AM






OK, I have SQL server 7 installed and have ScriptPkg. I've
tweaked the source to point to the local server. When I
run it and try to get it to convert the DTS job, it just
gives me back the error:
Unables to load WFLoadSick. Error: Unspecified error
WFLoadSick is the name of the DTS job that I am trying to
convert. I'm a little rusty on my VB so maybe I'm doing
something wrong, but the lack of a good error message
makes it decidedly hard to trace down whats wrong.
Any suggestions?

Reply With Quote
  #2  
Old   
Bret
 
Posts: n/a

Default ScriptPkg problems - 12-22-2003 , 07:08 PM






if you are using VBSCript use msgbox(your varialbes) to
find out what is going on with your variables. This might
help you identify what the error is.
Quote:
-----Original Message-----
OK, I have SQL server 7 installed and have ScriptPkg.
I've
tweaked the source to point to the local server. When I
run it and try to get it to convert the DTS job, it just
gives me back the error:
Unables to load WFLoadSick. Error: Unspecified error
WFLoadSick is the name of the DTS job that I am trying to
convert. I'm a little rusty on my VB so maybe I'm doing
something wrong, but the lack of a good error message
makes it decidedly hard to trace down whats wrong.
Any suggestions?
.


Reply With Quote
  #3  
Old   
Andy
 
Posts: n/a

Default RE: ScriptPkg problems - 12-23-2003 , 04:36 AM



I've checked the variables and they seem fine.
The code that im using is below. It fails at the LoadFromSQLServer statement with the unknown error.


Dim oPKG As DTS.Package, oStep As DTS.Step
Set oPKG = New DTS.Package

Dim sServer As String, sUsername As String, sPassword As String
Dim sPackageName As String, sMessage As String
Dim lErr As Long, sSource As String, sDesc As String

Dim oConn As DTS.Connection
Dim oDataPump As DTS.DataPumpTask
Dim sSQL As String


' Set Parameter Values
sServer = "(local)"
sUsername = "temp"
sPassword = "temp"
sPackageName = "sick"


' Load Package
oPKG.LoadFromSQLServer sServer, sUsername, sPassword, DTSSQLStgFlag_Default, , , , sPackageName
' Set Exec on Main Thread
For Each oStep In oPKG.Steps
oStep.ExecuteInMainThread = True
Next

' Execute
oPKG.Execute

' Get Status and Error Message
For Each oStep In oPKG.Steps
If oStep.ExecutionResult = DTSStepExecResult_Failure Then
oStep.GetExecutionErrorInfo lErr, sSource, sDesc
sMessage = sMessage & "Step """ & oStep.Name & _
""" Failed" & vbCrLf & _
vbTab & "Error: " & lErr & vbCrLf & _
vbTab & "Source: " & sSource & vbCrLf & _
vbTab & "Description: " & sDesc & vbCrLf & vbCrLf
Else
sMessage = sMessage & "Step """ & oStep.Name & _
""" Succeeded" & vbCrLf & vbCrLf
End If
Next

oPKG.UnInitialize

Set oStep = Nothing
Set oPKG = Nothing

' Display Results
MsgBox sMessage




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.