Brad
Katalon Apprentice
05/18/2018

SQL Query Error: Wrong number of parameters

I get a successful connection to a SQL Server, DAXBuilder database. I can successfully run the same query (which calls a stored procedure) against that database in Microsoft SQL Server Management Studio:

EXECUTE EmployeeCallPerformanceAverageTpaScore @AccountJSON
= '[]', @SiteJSON = '[]', @StartDate = '2018,1,4', @EndDate = '2018,3,5'

When I attempt to run that same query in Katalon Studio, using Data Files > Test Data > Database Data, even though the connection to the database is successful...


I get this error:


Wrong number of parameters: expected 4, was given 0 Query: EXECUTE EmployeeCallPerformanceAverageTpaScore @AccountJSON = '[]', @SiteJSON = '[]', @StartDate = '2018,1,4', @EndDate = '2018,3,5' Parameters: []

How do I correct this error and get the query to successfully return results?

Thank You!

Upvote
Quote

Comments

  • Brad
    Katalon Apprentice
    05/21/2018
    Realized that I did not use the bug template, but was not sure this was a bug, here is that info:

    To help us reducing time in analyzing a bug and also help you to quickly resolve your issue, it's recommended that you use below template to post your issue.

    ## OS (Windows 10? OSX Sierra?):  Windows 10

    ## Katalon Studio Version (4.7?, 5.0.1.2?) 5.4.1

    ## Katalon Studio logs:

    Windows (<Katalon Studio folder>\config\.metadata\.log):

    MacOS (file:///Applications/Katalon%20Studio.app/Contents/MacOS/config/.metadata/.plugins/org.eclipse.ui.workbench/log):

    I see nothing in the log that seems relevant and has a valid timestamp.


    ## Expected Behavior - to be able to run the query successfully and return data


    ## Actual Behavior - get this error "Wrong number of parameters: expected 4, was given 0 Query: EXECUTE EmployeeCallPerformanceAverageTpaScore @AccountJSON = '[]', @SiteJSON = '[]', @StartDate = '2018,1,4', @EndDate = '2018,3,5' Parameters: []"


    ## Screenshots / Videos

    please see screenshots above


    Thank you in advance for your help!

    Upvote
    Quote
  • Pooja
    Katalon Apprentice
    07/04/2018
    Any updates on this.. I am facing same issue using Katalon 5.4.2 with Windows 10 
    Upvote
    Quote
  • Pooja
    Katalon Apprentice
    07/11/2018
    Brad said:
    Realized that I did not use the bug template, but was not sure this was a bug, here is that info:

    To help us reducing time in analyzing a bug and also help you to quickly resolve your issue, it's recommended that you use below template to post your issue.

    ## OS (Windows 10? OSX Sierra?):  Windows 10

    ## Katalon Studio Version (4.7?, 5.0.1.2?) 5.4.1

    ## Katalon Studio logs:

    Windows (<Katalon Studio folder>\config\.metadata\.log):

    MacOS (file:///Applications/Katalon%20Studio.app/Contents/MacOS/config/.metadata/.plugins/org.eclipse.ui.workbench/log):

    I see nothing in the log that seems relevant and has a valid timestamp.


    ## Expected Behavior - to be able to run the query successfully and return data


    ## Actual Behavior - get this error "Wrong number of parameters: expected 4, was given 0 Query: EXECUTE EmployeeCallPerformanceAverageTpaScore @AccountJSON = '[]', @SiteJSON = '[]', @StartDate = '2018,1,4', @EndDate = '2018,3,5' Parameters: []"


    ## Screenshots / Videos

    please see screenshots above


    Thank you in advance for your help!

    Hello Brad,

    I am using latest version of katalon but still i am facing similar issues while running SQL stored Procedure and unable to run procedure using Katalon database checkpoints. Please let me if this issues resolved or not. Or is there any workaround in Katalon to execute stored procedure using database checkpoints.
    Upvote
    Quote
Sign In or Register to comment.