dbTalk Databases Forums  

Using LoadFromSQLServer in ActiveX script Task error

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


Discuss Using LoadFromSQLServer in ActiveX script Task error in the microsoft.public.sqlserver.dts forum.



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

Default 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

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.