I am using the sqlops module with odbc to INSERT,UPDATE only and as the documentation says I can omit result parameter in "sql_query". However I always see these ERRORS when processing the call: This is an example of a query: sql_query("c04", "insert into SIPInfo302CDR (SIPCallID,SessionID) values('$ci',$var(SessionID))");
And these are the error lines in the log: ERROR: db_unixodbc [res.c:60]: db_unixodbc_get_columns(): no columns returned from the query ERROR: db_unixodbc [res.c:261]: db_unixodbc_convert_result(): getting column names failed ERROR: db_unixodbc [dbase.c:216]: db_unixodbc_store_result(): failed to convert result ERROR: <core> [db_query.c:188]: db_do_raw_query(): error while storing result ERROR: sqlops [sql_api.c:265]: sql_do_query(): cannot do the query [insert into SIPInfo302CDR (SIPCa]
I have also tried using the parameter like shown below but the ERROR events happen anyways.
sql_query("c04", "insert into SIPInfo302CDR (SIPCallID,SessionID) values('$ci',$var(SessionID))", "ra"); sql_result_free("ra");
Even though the errors line show up and say that " cannot do the query .." the query does work and the records are inserted/updated accordingly.
I tried using the "sql_query_async" function that does not need the result parameter but I can't use it with unixODBC, I see these lines in the log when trying to use it: "the db driver module doesn't support async query" and the record is not inserted/updated. I also added the "async_workers" core parameter as well just in case.
I also tried declaring them in the module sqlops initialization section even though in my case there is no need: "modparam("sqlops", "sqlres", "ra")" but the errors show up anyways. When I test with SEELCT query the result parameter can be used, I can count rows etc. But I am only doing INSERT/UPDATE.
Am I am missing something here or this is something that can be safely used like that and I just need to ignore them. I am using " Kamailio (OpenSER) SIP Server v5.0" Thank you Fabian