Skip to content

Issue with getting output parameters values on procedure calls #45

@SlokarF

Description

@SlokarF

Good day,

i have an issue calling procedure and getting output parameters from it, procedure call seemingly executes but the output parameters values are not filled. there is my example code:

 await using var jdbcCommand = executionContext.Connection.CreateCommand("{ CALL TEST_SUM_DIFF(?,?,?,?)}");
 
 jdbcCommand.Parameters.Add(new JdbcParameter{ Direction = ParameterDirection.Input, ParameterName = "XY", DbType = DbType.Int32, Value = 3 });
 jdbcCommand.Parameters.Add(new JdbcParameter{ Direction = ParameterDirection.Input, ParameterName = "YX", DbType = DbType.Int32, Value = 2 });
 jdbcCommand.Parameters.Add(new JdbcParameter{ Direction = ParameterDirection.Output, ParameterName = "SUM_X_Y", DbType = DbType.Int32, Value = 0});
 jdbcCommand.Parameters.Add(new JdbcParameter{ Direction = ParameterDirection.Output, ParameterName = "DIFF_X_Y", DbType = DbType.Int32, Value = 0 });
 
 jdbcCommand.ExecuteNonQuery();

 var outParam1 = jdbcCommand.Parameters["SUM_X_Y"].Value.ToString();
 var outParam2 = jdbcCommand.Parameters["DIFF_X_Y"].Value.ToString();

Connection works, the call works, but the output is not given out, is there something I am doing wrong or is this a bug? If i am doing something wrong can I get corrected code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions