[erlang-questions] ODBC, PL/SQL and variable bindings

Peter Lemenkov lemenkov@REDACTED
Tue Nov 27 22:40:26 CET 2007


Hello All!
We use odbc interface with unixODBC driver for Oracle in production
for about 18 months w/o complains but only for very easy queries
(select something from sometable where someparams etc). Not so long
ago we faced one problem - executing of PL/SQL blocks with binding
variables for input and output. During quick googling via mail list
archive I found that this feature still unimplemented (still?) for
some architectural reasons.

Ok, can someone help me - are any ways to bind variables in odbc? Or
maybe there are some recommended way to walk around of such issues.

Just for example - one of my troublemakers, PL/SQL block.

====================

begin
:result :=ipport.pack_sys.PReport(:p_error_type, :p_error_code,
:p_error_object, :p_error_text, :p_error_mail_it);
end;

====================

I need to bind all variables (Result, ErrorType, ErrorCode,
ErrorObject, ErrorText, ErrorMailIt) to respective variables.

Although in this example it's very easy to rework to avoid using
PL/SQL completely, there are others there we shouldn't do that because
of possible SQL injections and so on.

So I'm stuck with this difficulty.

Any ideas?
-- 
With best regards!



More information about the erlang-questions mailing list