Hi list,
I compiled db_unixodbc and sqlops to connect with oracle db. I have a function that has dml inside. Because of this I can't just execute 'select pkg.function(a, b) from dual'.
I'm trying with BEGIN / END. The row is inserted but always are log errors:
Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: db_unixodbc [res.c:60]: db_unixodbc_get_columns(): no columns returned from the query
Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: db_unixodbc [res.c:261]: db_unixodbc_convert_result(): getting column names failed
Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: db_unixodbc [dbase.c:211]: db_unixodbc_store_result(): failed to convert result
Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: <core> [db_query.c:188]: db_do_raw_query(): error while storing result
Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: sqlops [sql_api.c:265]: sql_do_query(): cannot do the query [DECLARE ret CURSOR]
My query:
sql_query("cb","DECLARE ret CURSOR; BEGIN ret := pkg_partitioning.insert(True,'1'); END;");
I tried with other functions and no matter what type returns the oracle function; always logs errors. It's like unixodbc is waiting for a result with rows.
Any hint?
Thanks in advance,
Diego