dbTalk Databases Forums  

Call DTS from VB - SQL Server does not exist or access denied

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


Discuss Call DTS from VB - SQL Server does not exist or access denied in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
symoans (AT) yahoo (DOT) com
 
Posts: n/a

Default Call DTS from VB - SQL Server does not exist or access denied - 06-02-2006 , 04:38 PM






Hello all,

I am trying to call a DTS package from Machine A which is located on
the same domain as Machine B. Machine A is an XP box, Machine B is a
SS2k.

What I am trying to accomplish is run a VB 6.0 application which will
invoke the DTS package on the server. I have written the application,
below you will find the code.

' Set Parameter Values for DTS packages
sServer = "DBNAME"
sUsername = "user"
sPassword = "pass"
sPackageName = "PackageName"
sPackagePassword = "PackagePassword"

Set oPKG = New DTS.Package

oPKG.LoadFromSQLServer sServer, sUsername, sPassword, _
DTSSQLStgFlag_Default, sPackagePassword, , , sPackageName

For Each oStep In oPKG.Steps
oStep.ExecuteInMainThread = True
Next
oPKG.Execute


If I run this code from a simple form object on the SQL server (Machine
B), it runs with no problem. If I run the same exact code from Machine
A on the domain I get the error - access denied. I have tried using a
domain administrator account, but to no avail. Other things to note, I
have a stored procedure within the code, which executes fine from
Machine B.

I have tried both windows authentication mode and sql authentication
mode on the LoadFromSQLServer call. Nether of these worked.

Please someone ... any help?


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.