Support > Forums > OpenBots Studio > Can't run Stored Procedure with parameters - gets permission error

Can't run Stored Procedure with parameters - gets permission error

Guy Sanfilippo

  • Reporter
  • Calender Icon December 08,2022 at 4:50 PM

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 314 topics, 681 replies, and was last updated 23 days ago by Support Agent

Nataly Alvarado...

  • Participant
  • Calender Icon December 12,2022 at 8:14 PM

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.