Reputation: 25
How to get SQL Server username through C# code ?
Upvotes: 0
Views: 1539
Reputation: 19184
Try calling SELECT SUSER_SNAME() against your database. Or just get it out of your orginal connection string.
SELECT SUSER_SNAME()
Upvotes: 3