-
Notifications
You must be signed in to change notification settings - Fork 44
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
Question - How to get out values from a stored procedure? #95
Comments
It looks the 7th out parameter is NULL. Could you use get it as let doc_id: Option<String> = stmt.bind_value(7)?; // trying to get 7th out parameter |
I've just tried that, it returned Null, but that's strange because the same procedure successfully returns the both out parameters when I use Python, here's an example of my old Python code:
This code works fine, |
Could you post minimal reproducible example? I tested the following code and it works fine. create or replace procedure test_issue_95(num out number) is
begin
num := 10;
end; use oracle::Result;
use oracle::Connection;
fn main() -> Result<()> {
let conn = Connection::connect("username", "password", "database")?;
let sql = "begin test_issue_95(num => :1); end;";
let mut stmt = conn.statement(&sql).build()?;
stmt.execute(&[&oracle::sql_type::OracleType::Int64])?;
let num: Option<String> = stmt.bind_value(1)?;
println!("num: {num:?}");
Ok(())
}
|
oracle = 0.6.3
rust = 1.84.0
Hello Kubo!
I faced a problem with executing a stored oracle procedure that pushes customers payments to our billing. The procedure is:
This procedure has two out parameters - num_N_DOC_ID and dt_D_LOAD that should be returned after executing the procedure. I've binded every value during the execution include the out parameters.
My code is:
After running this code I get the error "NULL value found", and nothing happens in the billing.
Could you tell me how to execute procedures like this one correctly?
The text was updated successfully, but these errors were encountered: