SQLSever & Database roles

mrond
04-20-2004, 02:06 AM
Hey guys.


i have a VB application that creates new users in an SQL database.
Is there a way from VB to grant access to a database ROLE like DB_datareader and db_datawriter?


many thanks in advance

wengwashere
04-20-2004, 02:13 AM
Hey guys.


i have a VB application that creates new users in an SQL database.
Is there a way from VB to grant access to a database ROLE like DB_datareader and db_datawriter?


many thanks in advance

You can execute the sp_addrolemember function of SQL Server to Add a security account as a member of an existing SQL Server database role in the current database. YOu could call it from a stored procedure in ur vb code.

Hope that helps!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum