Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Triggers again - rajeevandanmishra

Status
Not open for further replies.

ADW

Programmer
Jun 21, 2001
50
GB
Thank you for your help, very much appreciated.
I thought that your response would work however, I am getting an error message that says; cannot use text, or ntext or image columns in the inserted, deleted columns. Here is the code.
f update (FirstName) and update(LastName)
BEGIN
select @tempage = (select * from Inserted)
begin
select @tempemp = (Select FirstName from Inserted)
select @tempstring = 'Mail notification of an update using atrigger - tony' + @tempemp
exec master.dbo.xp_sendmail
'tony.whitwell@decorpart.co.uk' ,@tempstring

end
end
Thank u again
 
Hi ADW,
Yep, SQL does not store the changed text, ntext and image values in CONCEPTUAL inserted and deleted tables.
And i think, if you continue storing your data in these columns, you require to check the change in the Front-End.
i.e. where you are accepting values from the user (in VB/VFP/ASP e.t.c forms). In the front end check if the value is changed and then execute the required SQL statements (like sendmail, e.t.c).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top