dbTalk Databases Forums  

Problem in executing a DTS from MS Access 2002

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


Discuss Problem in executing a DTS from MS Access 2002 in the microsoft.public.sqlserver.dts forum.



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

Default Problem in executing a DTS from MS Access 2002 - 05-19-2004 , 01:32 PM






I have a MS Access 2002 database which needs to run a SQL Server DTS
package from a VBA procedure.

When the MS Access DB is located on the SQLServer's server the DTS
runs fine.

However, when the Access DB is located on a different server the DTS
doesn't run and no error message is received - the VBA code just
finishes.

The code used to execute the DTS is:

.... Dim objPkg As DTS.Package

Set objPkg = New DTS.Package
objPkg.FailOnError = True

objPkg.LoadFromSQLServer "ServerName", "user", "pswd", , , , ,
"DTSName"
objPkg.Execute

Set objPkg = Nothing ...


The connection to SQL Server is fine as I can reference properties of
the package, but the .Execute seems to fail.

Does anyone have any ideas?

Thanks for any help in advance.

Chris.

Reply With Quote
  #2  
Old   
Douglas Laudenschlager [MS]
 
Posts: n/a

Default Re: Problem in executing a DTS from MS Access 2002 - 05-24-2004 , 06:25 PM






Chris,

Keep in mind that a DTS package runs on the client, that is, on the machine
from which you call the package. Therefore (1) you need all the DTS DLLs and
support files on the client, as listed in REDIST.TXT, and (2) any pointers
in the package itself to external resources, especially file system paths,
must be valid from all machines where the package might be executed (which
normally means UNC pathnames).

-Doug


--
Douglas Laudenschlager
Microsoft SQL Server documentation team
Redmond, Washington, USA

This posting is provided "AS IS" with no warranties, and confers no rights.

"Chris" <chrissmith_76 (AT) yahoo (DOT) co.uk> wrote

Quote:
I have a MS Access 2002 database which needs to run a SQL Server DTS
package from a VBA procedure.

When the MS Access DB is located on the SQLServer's server the DTS
runs fine.

However, when the Access DB is located on a different server the DTS
doesn't run and no error message is received - the VBA code just
finishes.

The code used to execute the DTS is:

... Dim objPkg As DTS.Package

Set objPkg = New DTS.Package
objPkg.FailOnError = True

objPkg.LoadFromSQLServer "ServerName", "user", "pswd", , , , ,
"DTSName"
objPkg.Execute

Set objPkg = Nothing ...


The connection to SQL Server is fine as I can reference properties of
the package, but the .Execute seems to fail.

Does anyone have any ideas?

Thanks for any help in advance.

Chris.



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

Default Re: Problem in executing a DTS from MS Access 2002 - 05-27-2004 , 08:00 AM



Doug,

Thanks very much for your input which was very helpful. The problem
was resolved by creating a ODBC connection from the end-user machines
to the SQLServer (on it's own machine). I already had the DTS DLLs.

Thanks again,
Chris

"Douglas Laudenschlager [MS]" <douglasl (AT) online (DOT) microsoft.com> wrote:

Quote:
Chris,

Keep in mind that a DTS package runs on the client, that is, on the machine
from which you call the package. Therefore (1) you need all the DTS DLLs and
support files on the client, as listed in REDIST.TXT, and (2) any pointers
in the package itself to external resources, especially file system paths,
must be valid from all machines where the package might be executed (which
normally means UNC pathnames).

-Doug


--
Douglas Laudenschlager
Microsoft SQL Server documentation team
Redmond, Washington, USA

This posting is provided "AS IS" with no warranties, and confers no rights.


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.