How to get username in Delete trigger http://forums.asp.net/t/1797149.aspx/1?How+to+get+username+in+Delete+trigger+Fri, 27 Apr 2012 09:57:45 -040017971494952186http://forums.asp.net/p/1797149/4952186.aspx/1?How+to+get+username+in+Delete+trigger+How to get username in Delete trigger <p>how to get username ,userid in delete trigger &nbsp;&nbsp;&nbsp;..........</p> <p>i have created delete tigger all tables.</p> <p>when user deleting data through application.</p> <p>deleteind details saved in another table ,but i not able get username or userid ...</p> <p>&nbsp;</p> 2012-04-26T07:20:54-04:004952331http://forums.asp.net/p/1797149/4952331.aspx/1?Re+How+to+get+username+in+Delete+trigger+Re: How to get username in Delete trigger <p>select username,userid from DELETED&nbsp;</p> <p></p> <p>In triggers INSERTED and DELETED are availble to select data from </p> 2012-04-26T08:28:46-04:004954214http://forums.asp.net/p/1797149/4954214.aspx/1?Re+How+to+get+username+in+Delete+trigger+Re: How to get username in Delete trigger <p>since data is deleted through application...</p> <p>iam able to get only Deleted details and also updated details from table.</p> <p>Not username who logged through application and Delete the data..</p> <p>So i any other way get application logged username in Sql trigger......</p> <p>&nbsp;</p> <p>Thanks in Advance ..</p> <p>Rajeshkumar</p> <p>&nbsp;</p> <p>&nbsp;</p> 2012-04-27T06:22:53-04:004954602http://forums.asp.net/p/1797149/4954602.aspx/1?Re+How+to+get+username+in+Delete+trigger+Re: How to get username in Delete trigger <p></p> <blockquote><span class="icon-blockquote"></span> <h4>rajeshkumar1988</h4> <p></p> <p>since data is deleted through application...</p> <p>iam able to get only Deleted details and also updated details from table.</p> <p>Not username who logged through application and Delete the data..</p> <p>So i any other way get application logged username in Sql trigger......</p> <p>Thanks in Advance ..</p> <p>Rajeshkumar</p> <p></p> </blockquote> <p></p> <p>Hi,</p> <p>If you couldn't find username and userid from table, you could use another way to store them in the table. Did you get the username and&nbsp;userid&nbsp;when he login in the&nbsp;application? &nbsp;You could store them in the parameters, and after deleting data, use insert clause to insert&nbsp;these two values into your table instead of Sql trigger.</p> <p>Thanks.</p> 2012-04-27T09:57:45-04:00