![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Okay, so here's my issue. I have an execute SQL task which queries a DB for the # of orders to be processed (select count(*) as nOrders from ORDERS) for any given day. Then, I have a script task, that takes this # and (if > 0) does everything else (process the orders, creates xml file, pgp encrypts it, and then transfers it via FTP to the fulfilment vendor). My problem is that when the # of orders are 0 I want to send a simple email to a group of people notifying them of the fact that there were no orders. And here's where I can't seem to get it to work. Any suggestions? Here's what I have (short version) immediately following the execute SQL task. Function Main() set rsOrderCount = DTSGlobalVariables("o_rsOrderCount").Value nOrders = rsOrderCount("nOrders") if nOrders > 0 then Main = DTSTaskExecResult_Success ''' take next steps....process order file, generate xml, pgp encrypt and ftp tasks follow else ''' EMAIL: NO ORDERS TO PROCESS GOES HERE (this is yet another ActiveX script end if End Function Help!!!!!!!! Thanks. DW |
![]() |
| Thread Tools | |
| Display Modes | |
| |