Using LoadFromSQLServer in ActiveX script Task error -
06-01-2006
, 12:31 PM
I used the following code in an ActiveX Script task to run an DTS package.
I keep getting a "SQL Server does not exist or access denied"
error for the line (in bold) in the following ActiveX script function. I also tried replacing
(local) with a specific server name, it then says this method is not supported.
I am a new SQL Server user, I would love to see if anyone can help
me with this one.
Thanks
Nancy
—----------------------------------------------------------------------------
Function Main()
Dim pkg, oPkg, sServer,sUID,sPWD,iSecurity,sPkgPWD,sPkgName
'Parent Package settings
Set pkg = DTSGlobalVariables.Parent
'Assign parameters
sServer = "(local)"
sUID= "abc"
sPWD = "xyzxyz"
iSecurity = DTSSQLStgFlag_UseTrustedConnection
sPkgPWD= ""
sPkgName = "dts_init_test"
'Load Child Package settings
Set oPkg = CreateObject("DTS.Package")
oPkg.LoadFromSQLServer sServer , sUID , sPWD , iSecurity, sPkgPWD ,"" ,"" , sPkgName
'Run the Child Pacakage
oPkg.Execute
oPkg.UnInitialize
Set oPkg = Nothing
Main = DTSTaskExecResult_Success
End Function
From http://www.developmentnow.com/g/103_...server-dts.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com |