Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with getting output parameters values on procedure calls #45

Open
SlokarF opened this issue Dec 19, 2024 · 0 comments
Open

Issue with getting output parameters values on procedure calls #45

SlokarF opened this issue Dec 19, 2024 · 0 comments

Comments

@SlokarF
Copy link

SlokarF commented Dec 19, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant