How can I apply sql server security settings programmatically in vb.net?

windows

Guest
Hello guys,

I am creating an application to an orgniazation in here, and this orgnization works on an sql server. What I wanna do is, to create a small windows form in vb.net to grant access to the database we have in the server or to deny it. I have a table to the list of employees. So, depending on which of these employees are checked true for database access, I will give the permission, otherwise, I will deny it.

So, is there anyway I can do this in code, not manually by going to the Enterprise manager in the sql server?????

I would really appreciate any help

Thanks and regards from the Akkadian Empiresure, if i understand you correctly... all you should need to do is make a connection to the database... query that table... check the permissions and then write the code based off the permissions.Thanks for your response REAGAN,

You know what I re-read my question above and I have done it this way before, I know how to do it this way. I am sorry for confusing you. What I couldn't do is, to set the permissions directly to the Sql Server, without saving the user data in a database, since sql Server already has a section for the permitted users.

I know that I can set and take the permissions directly from the Enterprise Manager, by going to the Sercurity section. But is there a way I can do it programmatically. In other words, create an application that adds new users, sets new permissions to the users, and etc...

I would really appreciate any suggestion,

Thanks again Reagan

Regards from the Akkadian EmpireAny suggestions??
 
Back
Top