Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1910
UserName as Parameter
posted

I am using the UltraWebGrid and want to track who is making a change to the data. I am using stored procedures for my select, insert, update and delete commands in the grid. When someone updates a record, I would like to send the username (current user logged in) to the stored procedure so that it can be updated in the table, but I can't figure out how to send the username as a parameter. Any help is appreciated. Thanks!

Parents
  • 1910
    Offline posted

    Hmmm...even when I change it so that the SQLSataSource uses SQL statements instead of stored procedures, I still can't seem to figure out how to send the UserName.

    My code looks like this right now: INSERT INTO tblLookup_Diag_Codes_CHF(Diag_Code) SELECT Diag_Code = @Diag_Code

    but I want it to look like this: INSERT INTO tblLookup_Diag_Codes_CHF(Diag_Code, Inserted_By) SELECT Diag_Code = @Diag_Code, Inserted_By = @Inserted_By

    except I need the @Inserted_By to be the login of the user that is currently logged in.

     

Reply Children