- LOIC DEFIEF
- PowerBuilder
- Friday, 3 July 2020 12:29 PM UTC
PB 2019 R2 Build 2279
We have a problem using application roles with ODBC driver for SQL Server and the SELECTBLOB function:
First we connect to the sql database using "ODBC Driver 17 for SQL Server" (or 13), then we activate application role by executing the sp_setapprole procedure for the transaction. After that, all the select are working fine and use the permissions granted in the application role, except when we call a SELECTBLOB. We got a message :
[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The SELECT permission was denied on the object ...
We have read on some forums the existence of a DbParm OptSelectBlob, which could solve the problem because apparently selectblob would use its "own" transaction and so doesn't use the application roles, but that doesn't seem to work with ODBC.
Do you have any idea to solve our problem?
Thanks
PS: It works fine with SQL native driver (SQLNCLI), but we need to use the ODBC sql driver...
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.