StrataFrame Forum

Subclass DataSourceItem

http://forum.strataframe.net/Topic22387.aspx

By ChanKK - 3/16/2009

Hi,

I am having audit log and data encryption in my database. I need to pass current login user name to a stored proc whenever that is any new connection opened. I was thinking to override SqlDataSourceItem.CreateBlankDbConnection() to add call for it.



Do you foresees any problem with this approach?



Thank you
By Trent L. Taylor - 3/16/2009

You will probably want to create an overload versus changing that one method as there are a number of places that will not expect the parameter.  But past that, I see no issues.  Also, if the active session is the same as the logged-in user, then you could just add the additional logic without a new parm as well using the security userPK from within that method without the needs for parms:

MicroFour.StrataFrame.Security.SecurityBasics.CurrentUser.UserPk