Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
degraft
Starting Member
10 Posts |
Posted - 2010-01-21 : 17:21:35
|
| Hi Fellows,I wrote an application in c# in which connecting to the database is not using Windows Authentication. All the application forms point to only one connection string that has an administrative user login.I would like to write a trigger for delete such that i would be able to pass the user that is logged in from the application so that it can be saved in an audit table with the deleted table so it shows who deleted that record.The method I am using now saves the user in the connection string but not the user that is logged into the application. I've tried so many times but it inserts only the record existing that was deleted with the old user. Please i really need some help here! Thanks |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2010-01-21 : 19:03:07
|
| What are you currently using to determine the "application user"?If I understand you correctly, the application is connecting to SQL using a SQL User and password. If so, SQL would have no idea which user is logged into the Windows environment. You might be able to cobble together a work around by having the application pass in the Windows user in the "Application Name" part of the connection string. SQL could then pull the data via the APP_NAME built in function.=======================================Few things are harder to put up with than the annoyance of a good example. (Mark Twain) |
 |
|
|
|
|
|