Skip to main content
May 24, 2022
Solved

Invalid Parameter on Stored Procedure

  • May 24, 2022
  • 2 replies
  • 0 views

I am getting an error   "???errors.invalidParameters???" when attempting to execute a SQL Function.

Here is my sQL select statement for my function:

SELECT * FROM [dbo].[p3_labor] (
   <@inv_mast_uid, int,>)
GO

a!executeStoredProcedureForQuery(
  dataSource: cons!POO_P21_Connection,
  procedureName: "p3_labor",
  inputs: a!storedProcedureInput(
    name: "inv_mast_uid",
    value: 114530
    )
)

Best answer by mikes0011

I'm not sure a!executeStoredProcedureForQuery() can access functions.  It would be neat if it could, though.

In case this makes any difference: if the procedure's input variable is "inv_mast_uid", then from what i've seen, it should be referenced inside the procedure without the "@" character.  Though I should disclaimer that I'm not thoroughly versed in all styles of syntax that can be used in procedures, so I could be assuming incorrectly here.

2 replies

mikes0011
mikes0011Answer
Brainy
May 24, 2022

I'm not sure a!executeStoredProcedureForQuery() can access functions.  It would be neat if it could, though.

In case this makes any difference: if the procedure's input variable is "inv_mast_uid", then from what i've seen, it should be referenced inside the procedure without the "@" character.  Though I should disclaimer that I'm not thoroughly versed in all styles of syntax that can be used in procedures, so I could be assuming incorrectly here.

The Expression Guru
May 24, 2022

Thanks Mike.  I went ahead and created a SP that called my function and it is works perfect.