Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Shihab
Starting Member
7 Posts |
Posted - 2002-12-09 : 07:41:52
|
Hello,Could someone help me in my big problem I will be very thankful to her/her I want to view, modify, add, delete user's of a (MS SQL Server database)and their priviliges through VisualBasic Progrmming.Because I want to build an application using Visual Basic to view, delete, add, and modify users and their permissions on (a MS SQL Server Database.)I hope to receive your reply.Thank you very very much |
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2002-12-09 : 08:33:52
|
Hi Shihab:You can use two approaches here- You can use SQL-DMO (Distributed Management Objects), it is a COM implementation of the SQL Server Administration library. It can let you administer an instance of SQL Server, including databases and users from an application like yours. Look up the documentation in Books online or MSDN Library
- Learn the T-SQL syntax for the various operations such as adding, deleting users and assigning rights. Look up documentation on sp_adduser, sp_addlogin, grant, etc. Once you are comfortable with these, you can build SQL Strings with the appropriate parameters and execute them through the ADO Connection or Command Objects
|
 |
|
Shihab
Starting Member
7 Posts |
Posted - 2002-12-09 : 16:12:53
|
thank you Mr. mohdowais for your quick reply I hope to know more things about yourself I want easily, and directly to deal with the SQL Server DataBase's users and permissions. This means (If there is an object in Visual Basic ,for example, through which I can view users of a SQL Server instance with their permissions and the ability of adding, deleting, and modifying these users with permissions also).Thank you very very much |
 |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-12-09 : 17:19:02
|
SQL-DMO is what you want. You can use that in VB, it is what Enterprise Manager is based on, so you can code anything that you can do in Enterprise Manager.Here are some introduction articles to DMO, there is a bunch more in books online and at MSDNhttp://www.sqlteam.com/item.asp?ItemID=9093http://www.sqlteam.com/item.asp?ItemID=11123Damian |
 |
|
Shihab
Starting Member
7 Posts |
Posted - 2002-12-10 : 14:05:18
|
quote: SQL-DMO is what you want. You can use that in VB, it is what Enterprise Manager is based on, so you can code anything that you can do in Enterprise Manager.Here are some introduction articles to DMO, there is a bunch more in books online and at MSDNhttp://www.sqlteam.com/item.asp?ItemID=9093http://www.sqlteam.com/item.asp?ItemID=11123Damian
Hello, Mr Merkin.Thank you very much for your reply Could you send me a sample code that ,for example, view the users of a SQL Server DataBase in the visual basic program and their permissions ???I will be very thankful |
 |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-12-10 : 17:22:05
|
quote: Could you send me a sample code that ,for example, view the users of a SQL Server DataBase in the visual basic program and their permissions ???
No sorry, I don't have any sitting around and certainly don't have time to write it for you.I suggest you follow the links I posted and read up on the documentation. There is sample code at MSDN if you take a little bit of time to find it.Damian |
 |
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2002-12-10 : 19:48:07
|
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/sql/reskit/sql2000/part10/c3561.asp |
 |
|
|
|
|
|
|