dbTalk Databases Forums  

Writing ActiveX Script

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


Discuss Writing ActiveX Script in the microsoft.public.sqlserver.dts forum.



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

Default Writing ActiveX Script - 10-24-2004 , 07:13 AM






Hi Everyone
Im a Beginner in using DTS
i m using a package in SQL Server That execute an sql query:

& i want to write the query in ActiveX Script so if it returns rows , i
want it to keep the first field for each row as a global variable and call
another task that send email to send email as the count of rows

and if it doesent return any row it skip all following tasks

How Can I Do It????????

Thx in Adv




Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Writing ActiveX Script - 10-24-2004 , 12:57 PM






OK
So what you can do is use the ExecuteSQL task to read the results into a
Global variable Rowset
You can then iterate over that. To store each row value in a GV would be
expensive as how many GVs do you know to declare? Use?

You can then use that Rowset and assign it to a Recordset object and read
the rowcount if you wish.

You then build up your SendMail task accordingley

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

Changing the DTS Send Mail Task
(http://www.sqldts.com/default.aspx?235)

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Mariame" <Mariame_Waguih (AT) yahoo (DOT) com> wrote

Quote:
Hi Everyone
Im a Beginner in using DTS
i m using a package in SQL Server That execute an sql query:

& i want to write the query in ActiveX Script so if it returns rows , i
want it to keep the first field for each row as a global variable and call
another task that send email to send email as the count of rows

and if it doesent return any row it skip all following tasks

How Can I Do It????????

Thx in Adv






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.