如何将商店prcoedure中的参数传递给触发器?更新或删除时 [英] how to pass parameter from store prcoedure to trigger? when update or delete

查看:68
本文介绍了如何将商店prcoedure中的参数传递给触发器?更新或删除时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,



如何将商店prcoedure中的参数传递给触发?? 更新时或删除。



我想维护由谁更新的数据,所以我想存储从asp.net登录的用户信息

Dear all,

how to pass parameter from store prcoedure to trigger?? when update or delete.

I want to maintain data which are updated by whom so i want to store user information who is logged from asp.net

推荐答案

ASP.Net是使用带有用户名和密码的连接字符串,还是使用Windows身份验证来获取SQL?



如果您使用Windows身份验证,那么您可以在触发器中使用SYSTEM_USER,但如果您的连接字符串中有用户名和密码,则始终是该用户如果您需要编写自己的存储过程来跟踪更改而不是使用触发器。
Is ASP.Net using a connection string with username and password, or are you using windows authentication to get to SQL?

If you use windows authentication then you can use SYSTEM_USER in the trigger but if you have a user name and password in your connection string it will always be that user in which case you''ll need to write your own Stored Procedures to track changes instead of using triggers.


这篇关于如何将商店prcoedure中的参数传递给触发器?更新或删除时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆