1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

MySQL 5.7 procedure call and output from SQL Server not working

Discussão em 'Outras Linguagens' iniciado por Stack, Julho 2, 2021.

  1. Stack

    Stack Membro Participativo

    The script worked in MySQL 5.6, but not in 5.7.

    Below is the information of the server and procedure I have.

    • A_Server : SQL SERVER 2014 Enterprise.
    • B_Server : mySQL 5.6
    • C_Server : mySQL 5.7

    << MySQL Procedure Source >>

    CREATE PROCEDURE "P_TEST2"(out _result2 int)
    BEGIN
    SET _result2 = 2223;

    END

    • "P_TEST2" is created in both server B and server C.

    << LinkedServer Info >>

    LK_B : A server to B

    LK_C : A server to C

    • MySQL ODBC Driver 8.0

    << procedure call. Server A to Server B >>

    declare @result int;

    exec ('CALL P_TEST2 (?);',@result output) AT LK_B;

    select @result as [@result] ;


    @result value : 2223

    << procedure call. Server A to Server C >>

    declare @result int;

    exec ('CALL P_TEST2 (?);',@result output) AT LK_C;

    select @result as [@result] ;


    @result value : null

    I really need the output value.

    Continue reading...

Compartilhe esta Página