Support > Forums > OpenBots Studio > Can't run Stored Procedure with parameters - gets permission error
Running the Execute Database Stored Procedure command. I am passing in a string that contains the procedure name and the parameter. The string variable, strStoredProcedure, contains this string: USP_UpdatePurchasedHours @strBatchNumber='1'
The log shows the following error: 2022-12-08 10:50:18.641 -05:00 [DBG] Running Line 94: Set Variable [strStoredProcedure = "USP_UpdatePurchasedHours @strBatchNumber='"+strBatchNumber+"'"] 2022-12-08 10:50:18.928 -05:00 [INF] Logging Line 95: Information - EXEC SP strStoredProcedure... USP_UpdatePurchasedHours @strBatchNumber='1' 2022-12-08 10:50:19.143 -05:00 [DBG] Running Line 96: Execute Database Stored Procedure [Stored Procedure 'strStoredProcedure' - Store Affected Row Count in 'intRowCount' - Instance Name 'parmInDBInstance'] 2022-12-08 10:50:19.224 -05:00 [ERR] Error Occurred at Line 96: Execute Database Stored Procedure [Stored Procedure 'strStoredProcedure' - Store Affected Row Count in 'intRowCount' - Instance Name 'parmInDBInstance'] - [Source: 'C:\Users\guyma\OneDrive\Documents\OpenBots Studio\OB Scripts\Timesheets\TS_1070_CreateExcelSummary.obscript', Type: 'OleDbException', Message: 'Syntax error, permission violation, or other nonspecific error'] 2022-12-08 10:50:19.453 -05:00 [DBG] Running Line 110: Catch ('typeof(System.Exception)')
I ran a Stored Procedure command without passing a parameter and it was successful. It appears the command has a bug. Perhaps it is missing the command property, "Query Parameters (Optional)". This command property is available in the Execute Database Query command.
This forum has 317 topics, 687 replies, and was last updated 4 months ago by Nataly Alvarado...
Hi gsanfilippo,
Unfortunately, as of Studio v1.8.6, the Execute Database Stored Procedure command doe not support input or output arguments.
Please note that this command feature is in our pipeline, and expected to be included in Studio 2.0 release.
Stay tuned!
You are not authorized to reply, please click here to login and add your reply to this topic.