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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top