thanks Bob and Richard you've given me some good pointers.


Dave Seddon  (p) 997-1803
Internet Software Support Specialist
Workplace Information Directorate, HRDC-DRHC
e-mail:   [EMAIL PROTECTED]
Web: http://labour.hrdc-drhc.gc.ca

---------- Original Text ----------

From: "Bob Silverberg" <[EMAIL PROTECTED]>, on 2002-07-18 5:06 PM:

David,

The one time I did this I didn't run the DTS package directly from CF,
rather I wrote a stored proc that ran the DTS package by calling DTSRUN via
xp_cmdshell.  It worked fine, but I did have some challenges getting
xp_cmdshell to run, as it requires some special permissions.  Unfortunately
I don't have any sample code as it was at a previous job.

Also, the error message you are reporting sounds like it's not finding the
correct DTS package.  You may want to try using Windows authentication (if
that's possible in your environment) by changing the 0 in your call to
LoadFromSQLServer to a 256.  I would also try creating a storage file and
using the LoadFromStorageFile method, rather than the LoadFromSQLServer
method.

Hope this is helpful,
Bob

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 19, 2002 7:53 AM
Subject: [CFTALKTor] run dts package


> Hi everybody,
>
> I'm looking for help in running a DTS package on MS SQL 7 thru code.
>
> Ive encountered several conflicting views and ways of going about it.
>
>
> One resource suggested to use  CFEXECUTE dtsrun.exe "MyPackageName".
> Which I couldn't get to work.
>
> And on cfcomet I found this code:
>
> <CFTRY>
>     <CFOBJECT TYPE="COM" NAME="objDTS" CLASS="DTS.Package"
ACTION="CREATE">
>     <CFCATCH TYPE = "Object">
>         <CFSET error_message = "The DTS Package Object Could Not Be
Created.">
>     </CFCATCH>
> </CFTRY>
>
> <CFTRY>
>     <CFSET r =
>
objDTS.LoadfromSQLServer("servername","adminname","password",0,"","","","dts
_00
> 0000001","")>
>     <CFCATCH>
>         <CFSET error_message = "The DTS Package Could Not Be Loaded From
the
> SQL Server at this time.">
>     </CFCATCH>
> </CFTRY>
>
> <CFIF IsDefined("error_message")>
>     <CFOUTPUT>#error_message#</CFOUTPUT>
> </CFIF>
>
> <CFSET p = objDTS.Execute()>
>
> however I fall into the second error message in the cfcatch, and cf tells
me
> that:
>
> Error Diagnostic Information
> No Steps have been defined for the transformation Package
> .
>
> I am unsure how to proceed, has anyone ever manged to get a dts to run
thru
> code?
>
> The dts runs fine thru the Enterprise Manager.
>
> thanks.
>
> Dave Seddon  (p) 997-1803
> Internet Software Support Specialist
> Workplace Information Directorate, HRDC-DRHC
> e-mail:   [EMAIL PROTECTED]
> Web: http://labour.hrdc-drhc.gc.ca
>
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: [EMAIL PROTECTED]
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED])
http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)
>

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Bob Silverberg" 
<[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: [EMAIL PROTECTED]
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

Reply via email to