Users from MS SQL

  • Thread starter Thread starter xxxxyz
  • Start date Start date
X

xxxxyz

Can I get user id from sysusers table in my C# code when the user is
connected to the database?

Thanks.
 
sp_helplogins will retrieve a list of all Logins for the SQL Server.
the Colum SID will be returned as a byte[]
 
Can I get user id from sysusers table in my C# code when the user is
connected to the database?

Just create a SqlCommand with the query text

select uid, name from sysusers

and execute that - that's all there is, really.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
 
Back
Top