Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get webuser login from session variable
Message
De
12/08/2012 03:40:24
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01550318
Message ID:
01550354
Vues:
38
>>>Hi all, please I need to know how to get the logged user for my audit procedure when changing data on tables.
>>>T.I.A.
>>
>>>http://msdn.microsoft.com/en-us/library/ms187934.aspx
>>
>>>http://msdn.microsoft.com/en-us/library/ms179930.aspx
>>
>>Thank you Viv Phillips, but I did the question wrong, I mean a logged user from asp web page, I created a session variable with that name, then I need anyplace in the program audit with that session variable, because I'm using a generic user to connect.
>>I mean, I need to implement stored procedures to get the logged user from that asp session variable, in sqlserver.
>
>You need to pass the user name to the stored procedure doing the update/insert as a parameter. You don't have a better option.

But how would that be available to the trigger ?

One (devious) option might be to pass the username as the application name in the connection string. I haven't tried it but I'd assume you could somehow access that from the trigger ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform