Stored procedure as a parameter query

(5 posts) (2 voices)
  1. fdelpozo, Blocked

    I have a stored procedure sp_DBR_program_list(username char) on MYDBR DB.
    I have created a popup parameter and the query is:
    sp_DBR_program_list(inLogin)

    But don't works, this is the error:
    Report procedure 'sp_DBR_program_list(inLogin)' does not exists in the database. Make sure the procedure is correctly created.

    I have created the sp with the user admin of the MYDBR database.

    Other test that shows the sp works and exists...

    Parameter query: sp_DBR_program_list

    Error: DB error (1318): Incorrect number of arguments for PROCEDURE sp_DBR_program_list; expected 1, got 0
    SQL: call sp_DBR_program_list();

  2. myDBR Team, Key Master

    Just leave the popup parameter query as "sp_DBR_program_list" without the parameter definition. myDBR knows it has a parameter and fills it accordingly.

    --
    myDBR Team

  3. fdelpozo, Blocked

    If I leave the parameter query as "sp_DBR_program_list" without the parameter definition i Have this error.

    Error: DB error (1318): Incorrect number of arguments for PROCEDURE sp_DBR_program_list; expected 1, got 0
    SQL: call sp_DBR_program_list();

    BTW I need to pass a parameter to the sp (inLogin).

  4. myDBR Team, Key Master

    You got still an error somewhere. What excatly do you have in the Parameter query / Query field? Also could you show the CREATE PROCEDURE statement for sp_DBR_program_list until the first BEGIN.

    What happens is that when myDBR sees that a parameter query has parameters, it will automatically add the inLogin value as parameter. You do not need to add it yourself.

    --
    myDBR Team

  5. fdelpozo, Blocked

    Ok, now it works. I have created the sp like:

    CREATE PROCEDURE sp_DBR_program_list(inLogin varchar(30))
    BEGIN
    ...

    and the parameter query: "sp_DBR_program_list"

    Thanks for the help.


Reply

You must log in to post.