Files
asterisk/res
Alexei Gradinari e6a69ea2cf res_odbc: fix missing SQL error diagnostic
On SQL error there is not diagnostic information about this error.
There is only
WARNING res_odbc.c: SQL Execute error -1!

The function ast_odbc_print_errors calls a SQLGetDiagField to get the number
of available diagnostic records, but the SQLGetDiagField returns 0.
However SQLGetDiagRec could return one diagnostic records in this case.

Looking at many example of getting diagnostics error information
I found out that the best way it's to use only SQLGetDiagRec
while it returns SQL_SUCCESS.

Also this patch adds calls of ast_odbc_print_errors on SQL_ERROR
to res_config_odbc.

ASTERISK-28065 #close

Change-Id: Iba5ae5470ac49ecd911dd084effbe9efac68ccc1
2018-09-26 09:25:10 -05:00
..
2018-09-18 11:32:18 -05:00
2018-05-11 09:48:58 -04:00
2018-05-11 09:48:58 -04:00
2016-07-22 10:09:08 +02:00
2017-12-20 12:40:01 -05:00
2017-12-15 10:14:31 -05:00
2018-09-18 11:32:18 -05:00
2017-12-15 10:14:31 -05:00