Re: xp_sendmail in trigger from asp page -error
From: R.D (RD_at_discussions.microsoft.com)
Date: 01/04/05
- Next message: Rob R. Ainscough: "Re: Programmatically building a database on SQL Server 2000?"
- Previous message: David Gugick: "Re: Filter records"
- In reply to: David Portas: "Re: xp_sendmail in trigger from asp page -error"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 3 Jan 2005 20:31:01 -0800
Hi David
I was also thingking that better I use sp instead of trigger and schedule it
to notify.
Actually, I would like to send information to the user when ever data is
updated/inserted. It can be scheduled as delay is no problem.
How to track the updated records and inserted records between a particular
time, i schedule it to happen twice a day.
SHOUD I USE timestamp or is there any method to track updated information.
I use another column 'LastUpdated' again I have to use trigger to update it?
can you just show me the way out
Thanks and Regards
R.D
"David Portas" wrote:
> Did you try SET NOCOUNT ON in your SP? You may get more help in an ASP
> newsgroup but please include the exact error message you have.
>
> IMO it makes no sense to send email from a trigger. There is no need to hold
> open a transaction while you do this and it is bad practice to do so simply
> on the principle that transactions should always be as short and concise as
> possible. Either have the SP that performs the update send the email outside
> the transaction (I'm assuming your ASP doesn't update the table directly) OR
> use a separate process to send out emails at regular intervals (you can use
> SQL Agent for example).
>
> --
> David Portas
> SQL Server MVP
> --
>
>
>
- Next message: Rob R. Ainscough: "Re: Programmatically building a database on SQL Server 2000?"
- Previous message: David Gugick: "Re: Filter records"
- In reply to: David Portas: "Re: xp_sendmail in trigger from asp page -error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|