|
|
|
Author |
Message |
RaineA
|
Posted: Thu Jan 13 17:13:31 CST 2005 |
Top |
SQL Server >> trigger
Hello,
Is it possible to pass username to a trigger procedure. I have a update
trigger that send an SMTP email to some users. I need to send user name that
caused trigger to be rised. I am suing xp_smtp_sendmailto send email.
Thanks,
Jim.
SQL Server85
|
|
|
|
|
David
|
Posted: Thu Jan 13 17:13:31 CST 2005 |
Top |
SQL Server >> trigger
> Hello,
> Is it possible to pass username to a trigger procedure. I have a
> update trigger that send an SMTP email to some users. I need to send
> user name that caused trigger to be rised. I am suing
> xp_smtp_sendmailto send email. Thanks,
> Jim.
You can use a temp table or a global temp table for this, as long as the
calling procedure creates it and inserts the data. Or you can use a real
table and use the suser_sname() to get the user name for querying.
But what is the reason for the password? Can't you send an email message
without a password using xp_sendmail?
--
David Gugick
Imceda Software
www.imceda.com
|
|
|
|
|
Ryan
|
Posted: Thu Jan 13 17:22:22 CST 2005 |
Top |
SQL Server >> trigger
Are you talking username accessing the DB, username on the client
workstation, username logged into ASP.net?? Where does this data come
from... This is something that should be trapped in your middle tier if its
not the DB user.
--
Ryan Hanisco
MCSE, MCDBA
Flagship Integration Services
> Hello,
> Is it possible to pass username to a trigger procedure. I have a update
> trigger that send an SMTP email to some users. I need to send user name
that
> caused trigger to be rised. I am suing xp_smtp_sendmailto send email.
> Thanks,
> Jim.
>
|
|
|
|
|
|
|