Share this page

# Example: lrd_save_ret_param

In the following example, the lrd_save_ret_param function, saved two return parameters to parameters. VuGen recorded the call to a stored procedure, and lrd_save_ret_param saved the return values of the stored procedure to the parameters Saved_return_status and Saved_name1_out.

    The original script shows the result grid directly after the lrd_result_set function.

    lrd_bind_placeholder (Csr1, "name15_out", &name15_out_D31, 0, 0);

    lrd_assign_literal (&name16_out_D32, "\xFE\x00\x00\x00\. . . ", 0, 0, 0); lrd_bind_placeholder(Csr1, "name16_out", &name16_out_D32, 0, 0);

    lrd_exec(Csr1, 0, 0, 0, 0, 0);

    lrd_result_set(Csr1, 0 /*Succeed*/, 0, 0);

    lrd_result_set(Csr1, 1 /*No results*/, 0, 0);

After correlation, the lrd_save_ret_param function appears in the script. In this example, lr_output_message displays the value of the parameter.

    lrd_bind_placeholder (Csr1, "name15_out", &name15_out_D31, 0, 0);

    lrd_assign_literal (&name16_out_D32, "\xFE\x00\x00\x00\. . . ", 0, 0, 0); lrd_bind_placeholder(Csr1, "name16_out", &name16_out_D32, 0, 0);

    lrd_exec(Csr1, 0, 0, 0, 0, 0);

    lrd_result_set(Csr1, 0 /*Succeed*/, 0, 0);

    lrd_save_ret_param(Csr1,0,1,"Saved_return_status");

    lrd_save_ret_param(Csr1,1,0,"Saved_name1_out");

    lr_output_message("********** %s ******",lr_string("<Saved_return_status>"));

    lr_output_message("*********** %s *******",lr_string("<Saved_name1_out>"));

    lrd_result_set(Csr1, 1 /*No results*/, 0, 0);

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: