Groups | Blog | Home
all groups > sql server (microsoft) > june 2006 >

sql server (microsoft) : How do I query pc making call to data base?



prumery NO[at]SPAM verizon.net
6/25/2006 9:04:37 AM
I'm using one account to connect to the 2005 express data base via
asp.net v2 and I want to get the users domain account and insert it
into journal tables. Is there a way for me to get the users domain
account from a stored procedure? If not, how would you track changes
to data from a shared account?

***** scenario *****
pc "A" is using account "domain\bozo" and using asp.net app to update
customer records on sql express 2005. asp.net uses account "master" to
call stored procedures to update customer records. journal table
stores "master" and not "domain\bozo" as user who updated the record.

thanks in advance for the help!
Jens
6/25/2006 1:07:41 PM
Hi,

acutally no. As SQL Server, as far as I understood has no clue about
the ASP.NET user which is using the application it can=B4t insert the
appropiate data in the database. What you can do is to get the user
context from the ASP.NET application and execute another stored
procedure to updatr the journal table within the same transaction of
you business layer.

HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---
AddThis Social Bookmark Button