K2InformaticsGmbH / erloci

Erlang Oracle native driver - DEPRECATED, see https://github.com/K2InformaticsGmbH/oranif instead
Apache License 2.0
37 stars 11 forks source link

String out variable values are not trimmed to correct size #24

Closed c-bik closed 8 years ago

c-bik commented 8 years ago
PlSql = <<"BEGIN  :p_res1 := 'This is a test1';  :p_res2 := 'This is a test2'; END;">>.
PlSqlBindVars = [{<<":p_res1">>,out,'SQLT_CHR'},{<<":p_res2">>,out,'SQLT_CHR'}].
PlSqlStmt = OciSession:prep_sql(PlSql).
ok = PlSqlStmt:bind_vars(PlSqlBindVars).
PlSqlStmt:exec_stmt([{<<"                          ">>,<<"                          ">>}], 1).
> {executed,1,
          [{<<":p_res1">>,<<"This is a test1           ">>},
           {<<":p_res2">>,<<"This is a test2           ">>}]}
ok = PlSqlStmt:close().