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 |
|
ScottBot
Starting Member
16 Posts |
Posted - 2011-12-22 : 12:37:57
|
| I have set up and got the .net Membership working on an external SQL Server however I would like to be able to assign each new person upon registration to a default Role. I have two roles set up at the moment (Admin and Client), I would like upon registration for it to assign each new person as "Client".Anyone got a solution? I have looked through the stored procedures etc. but feel I may be looking in the wrong place.Cheers! |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-12-22 : 12:41:48
|
Assuming this is a server role, you would need some variation of the sp_addsrvrolemember, for example:EXEC master..sp_addsrvrolemember @loginame = N'JaneSmith', @rolename = N'ClientRole' http://msdn.microsoft.com/en-us/library/ms186320.aspx |
 |
|
|
|
|
|