Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Bulk mail sender

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-02 : 09:05:11
Richard writes "I have to, in some way or the other, be able to initiate a batch job involving sending a HUGE amount of e-mails to users registered in a table. Currently I'm calling a stored procedure from an ASP page. All the page really does is to send the subject and the mail body to the procedure. The procedure parses the usertable and sends a copy of the mail to each user through SQL-mail (Outlook client).

My problem is that the connection times out because the active server page waits for the procedure to finish. I don't really want the page to wait, because the job will take a LONG time to finish (we're talking tens of thousands of users here).

I have tried a workaround with a trigger attached to a table that recieves the subject and body data, that executes the stored procedure. Hoping this would end the connection after the insert and then continue running the procedure on its own. But the whole thing came to an abrubt halt, because I rely on creating a temporary table in the procedure which the trigger don't like at all.

I have also been messing around with asynchronous connections (ADO) in ASP, but with no apparent luck either. Maybe it's possible to execute an sql-agent-job on demand instead?

Please help! I'm desperate here ..."
   

- Advertisement -