Could someone please explain (step-by-step) how to connect to some MSSQL DB using application role in Delphi (ADO components)? I’ve created a user in MSSQL DB and application role but calling stored procedure sp_setapprole from Delphi app is not working for me..
As far as I know I probably made to many mistakes from the very start, so I would be gratefull for a detailed instructions from the beginning.
Calling sp:
ADOStoredProc1->Parameters->ParamByName("@rolename")->Value = "test";
ADOStoredProc1->Parameters->ParamByName("@password")->Value = "test";
ADOStoredProc1->ExecProc();
ShowMessage(ADOStoredProc1->Parameters->ParamByName("@RETURN_VALUE")->Value); //0
I found the problem. I opened dataset BEFORE calling stored procedure, and that is why it didn’t work. Now it’s OK. Thanks whosrdady for trying to help 🙂