CAMSYSTEMS
asked on
SQL Function to get attributes from a connectionstring
Is there anyway that SQL Server 2005 can get information contained within the ConnectionString that was used to connect to the database for use in a trigger.
For example, if I have an application that uses the ConnectionString...
"server=(local); database=test; user=sa; pwd=testing; applicationname=myprogram"
how can I get out the applicationname attribute???
For example, if I have an application that uses the ConnectionString...
"server=(local); database=test; user=sa; pwd=testing; applicationname=myprogram"
how can I get out the applicationname attribute???
what exactly are you trying to do here??
From what I can see so far, you can't do that
From what I can see so far, you can't do that
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
All I want to do is to be able to extract the applicationname attribute from the connectionstring that has been used to connect to the database from within SQL Server 2005???
I would create a SQL login specific to the application instead of using sa and assign it permissions required by the app. Then you could know that the value returned by current_user is your application.
From what I can see so far, you can't do that