[dba-SQLServer] ActiveX & DTSTaskExecResult - was [IF THEN Logic - DTS or sp?]:

Ron Moore rmoore at comtechpst.com
Wed Dec 8 12:03:38 CST 2004


With no response yet, and wanting to avoid the end user's lack of
permissions needed for dtsrun or sp_OAccess, I've tried the following.

In a DTS package, I've added a data pump to export the flags to an external
text file.  Then an ActiveX script Task reads the flags from the text file
and stuffs them into variables.  There is a success and fail path for the
script.  I also have an IF-THEN-ELSE block in the script that sets the
DTSTaskExecResult as Success or Failure.  This approach works in another
package, but fails here.

      IF CUST_MD_FLAG = "1" OR MD_FLAG = "1" THEN
		Main = DTSTaskExecResult_Success
      ELSE
		Main = DTSTaskExecResult_Failure
      END IF
End Function

Any Ideas?
In trouble again,
Ron

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ron Moore
Sent: Tuesday, December 07, 2004 10:54 AM
To: dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer] IF THEN Logic - DTS or sp?:

I need to read a couple of flags from a semi-static table and then 0, 1, or
2 DTS packages accordingly.

 

What's the best method for reading these flags and determining which
package(s) to execute?  Can IF THEN logic be implemented reliably within a
DTS package (I have done so in the past with activeX script testing if an
external text file exists - but this would require reading the flag from a
SQL table)?  Or, can I successfully run a DTS package from a stored
procedure ('googling' show a few posts but lots of complaints and lack of
success)?

 

TIA, as always,

Ron Moore

 

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com







More information about the dba-SQLServer mailing list