473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Users from MS SQL

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

Thanks.

Nov 16 '05 #1
2 1078
sp_helplogins will retrieve a list of all Logins for the SQL Server.
the Colum SID will be returned as a byte[]

Nov 16 '05 #2
>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
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: zsh-users-help | last post by:
Hi! This is the ezmlm program. I'm managing the zsh-users@sunsite.dk mailing list. To confirm that you would like python-list@python.org removed from the zsh-users mailing list, please send...
6
by: Hannu | last post by:
Hi. In the ldb file you can see the users of the mdb-file. If you open the mdb-file your machine and username will be written in the lbd- file. Allthough you close the mdb-file your name won't...
5
by: Andy Davis | last post by:
I have a two tables, Users and Requests, the latter which displays the daily log on's of 20 users. Both tables are related by a one-to-many relationship in the Requests table via the UserId field....
3
by: mgPA | last post by:
Short: How can I limit the number of concurrent logins to Access (2000) DB? Long: I seem to be having the problem discussed in previous postings of having more than 9 or 10 concurrent logins. ...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
6
by: google | last post by:
I have a few general questions. I am working on a new database to be used within my company. I would like to give a couple of people, particularly HR, the ability to add and delete Access users,...
5
by: profdotnet | last post by:
Below is the code of web.config file: <configuration> <system.web> <authentication mode="Forms" /> <authorization> <allow users="Admin"/> <deny users="Jack,Mary" /> <deny users="?">...
1
by: cefrancke | last post by:
I have a Back End database (split) that is on a smokin' hot machine (dual processor, 2 gig RAM, XP Pro SP2) and I'm getting an error that says the database (back end file) is "opened exclusively"...
2
by: Vayse | last post by:
1) How do I get a list of all users in a domain? I've searched the web, but any sample I've found seems to use VB 2003 or earlier. Is there any samples that user 2005, and make full use of the My...
9
by: Jonathan Wood | last post by:
I've spent days trying to come up with a solution. I'd appreciate it if anyone can help. My site requires all users to log on. There are three different roles of users, and each user type will...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.