Managing SQL Server using C#
I'm wondering whether and how I can do the following using .NET (more specifically, C#):
- Get a list of users from SQL Server
- Create a new Database in SQL Server
- Create a new user in SQL Server
- Connect to SQL Server with a user who has Windows Authentication enabled (instead of a login name and password inside SQL Server)
- Find the answer to similar questions - Where are things like these documented?
I've figured out how to create tables inside existing databases - you simply execute the correct SQL statement. But I can't figure out how to do these other things. Any help would be greatly appreciated.

mikerRank #2,843 · 502 reputationPosted Jan 12, 2005, 4:01 AM EST
pedro.godinho12 reputationPosted Jan 13, 2005, 4:21 AM EST
newton_2000_1717 reputationPosted Jan 14, 2005, 3:57 AM EST
newton_2000_1717 reputationPosted Jan 14, 2005, 3:58 AM EST