"Application role" (sp_setapprole ) support/example?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
gwideman
Posts: 4
Joined: Fri 18 Jan 2008 11:02

"Application role" (sp_setapprole ) support/example?

Post by gwideman » Wed 13 Oct 2010 06:35

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

AndreyZ

Post by AndreyZ » Thu 14 Oct 2010 11:58

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;

Post Reply