Button syntax - what am I doing wrong?

(2 posts) (2 voices)

Tags:

No tags yet.

  1. duane, Member

    I'm trying to link reports with a button...but I can't get it to pass the variable along....so wondering what I am doing wrong as it is supposed to be easy!

    SELECT 'dbr.button', 'Next ->', 'button nextpage'; SELECT 'dbr.report', 'sp_DBR_complete', 'inID=ID';

    SELECT @myID AS 'ID';

    I have set @myID earlier in the code and want to pass it to the button and next page. The following page autoexecutes and has inID as the only parameter (and is added with the correct permissions). But it doesn't seem to pass the parameter.

    Any suggestions?

  2. myDBR Team, Key Master

    The syntax is correct. You should check the value for the variable (just select it before the button). You should see the variable value in the URL p1 parameter.

    Btw, when you are using MySQL/MariaDB, you should avoid using user-defined variables (@var) and instead use local variables (declare v_var...). The user-defined variables have limited datatype support and are visible throughout the session (may mix things up if you call other procedures / functions).

    --
    myDBR Team


Reply

You must log in to post.