Page 1 of 1

"Application role" (sp_setapprole ) support/example?

Posted: Wed 13 Oct 2010 06:35
by gwideman
Hi folks,

Are there any special features in SDAC to simplify working with SQL Server "application roles"? Any docs or examples of how to work with app roles?

Thanks,

Graham

Posted: Thu 14 Oct 2010 11:58
by AndreyZ
Hello,

You can use the TMSStoredProc component to work with application roles like this:

Code: Select all

  MSStoredProc.StoredProcName := 'sp_setapprole';
  MSStoredProc.Params.ParamByName('rolename').AsString := 'rolename';
  MSStoredProc.Params.ParamByName('password').AsString := 'password';
  MSStoredProc.Params.ParamByName('encrypt').AsString := 'encrypt';
  MSStoredProc.Execute;