- Larry Pettit
- PowerBuilder
- Thursday, 30 May 2024 06:17 PM UTC
After successfully connecting to a Microsoft SQL Server database using SQLCA in PowerBuilder 2022 R2 and the MSOLEDBSQL 19.3.3.0 driver, I am trying to call the sp_addapprole stored procedure using the following code:
string ls_sql
ls_sql = "sp_setapprole @rolename=N'rolename', @password=N'" + "rolepassword" + "'" (rolename and rolepassword have been replaced)
execute immediate :ls_sql;
sqlca.sqlcode is -1
sqlca.sqlerrortext = The procedure 'sys.sp_setapprole' cannot be executed within a transaction.
How can I execute this stored procedure outside a transaction? Everything we are currently doing is within a transaction.
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.