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

SQLT_VNU as out parameter is not supported #25

Open
c-bik opened this issue Aug 23, 2016 · 0 comments
Open

SQLT_VNU as out parameter is not supported #25

c-bik opened this issue Aug 23, 2016 · 0 comments
Assignees
Labels

Comments

@c-bik
Copy link
Member

c-bik commented Aug 23, 2016

Works:

PlSql = <<"BEGIN :p_Absolute:=round(abs(:p_val1),0); :p_Floor:=round(floor(:p_val2),0); END;">>.
PlSqlBindVars = [{<<":p_val1">>,in,'SQLT_VNU'},{<<":p_val2">>,in,'SQLT_VNU'},
{<<":p_Absolute">>,out,'SQLT_INT'},{<<":p_Floor">>,out,'SQLT_INT'}].
PlSqlStmt = OciSession:prep_sql(PlSql).
ok = PlSqlStmt:bind_vars(PlSqlBindVars).
PlSqlStmt:exec_stmt([{oci_util:to_num("-5.5"), oci_util:to_num("4.9"),0,0}], 1).
> {executed,1,[{<<":p_Absolute">>,6},{<<":p_Floor">>,4}]}
ok = PlSqlStmt:close().

Doesn't work:

PlSql = <<"BEGIN :p_Absolute := abs(:p_val1); :p_Floor := floor(:p_val2); END;">>.
PlSqlBindVars = [{<<":p_val1">>,in,'SQLT_VNU'},{<<":p_val2">>,in,'SQLT_VNU'},
                           {<<":p_Absolute">>,out,'SQLT_VNU'},{<<":p_Floor">>,out,'SQLT_VNU'}].
PlSqlStmt = OciSession:prep_sql(PlSql).
ok = PlSqlStmt:bind_vars(PlSqlBindVars).
PlSqlStmt:exec_stmt([{oci_util:to_num("-5.5"), oci_util:to_num("4.9"),
                      oci_util:to_num("-100.100"), oci_util:to_num("-100.100")}], 1).
> {error,{0,
        <<"[ocistmt::execute:763] unsupporetd type 6\n">>}}
ok = PlSqlStmt:close().
@c-bik c-bik added the bug label Aug 23, 2016
@c-bik c-bik self-assigned this Aug 23, 2016
c-bik pushed a commit that referenced this issue Apr 16, 2017
Migrating common test config processing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant