I'm using VS C# express with SQL 2005 express.
I have the following problem:
I would like to assign database roles in a given database for a login by using smo. Let's say:
I have a Login, created with smo named MyLogin and a database name MyDatabase.
How can I map MyLogin to MyDatabase and give for example db_datawriter database role membership for it, using SMO?
I do not find the way, propably I miss something...
Any help is highly appreciated, I would be thanksfull if one could give a code example to solve this.
View Complete Post