我已经将odbc连接到MSSQL服务器,并且正在从中获取sip帐户和拨号计划,并且我也可以在两个对等方之间进行呼叫,但星号会出错:
'[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:661 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to MSSQL [MSSQL]...
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:765 ast_odbc_sanity_check: Connection is down attempting to reconnect...
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1528 odbc_obj_connect: Connecting MSSQL
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1567 odbc_obj_connect: res_odbc: Connected to MSSQL [MSSQL]
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:649 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 42000: [FreeTDS][SQL Server]The invalid escape character "\\" was specified in a LIKE predicate. (89)
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:661 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to MSSQL [MSSQL]...
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:765 ast_odbc_sanity_check: Connection is down attempting to reconnect...
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1528 odbc_obj_connect: Connecting MSSQL
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1567 odbc_obj_connect: res_odbc: Connected to MSSQL [MSSQL]
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:649 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 42000: [FreeTDS][SQL Server]The invalid escape character "\\" was specified in a LIKE predicate. (89)
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:661 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to MSSQL [MSSQL]...
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:765 ast_odbc_sanity_check: Connection is down attempting to reconnect...
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1528 odbc_obj_connect: Connecting MSSQL
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1567 odbc_obj_connect: res_odbc: Connected to MSSQL [MSSQL]
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:649 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 42000: [FreeTDS][SQL Server]The invalid escape character "\\" was specified in a LIKE predicate. (89)
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:661 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to MSSQL [MSSQL]...
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:765 ast_odbc_sanity_check: Connection is down attempting to reconnect...
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1528 odbc_obj_connect: Connecting MSSQL
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1567 odbc_obj_connect: res_odbc: Connected to MSSQL [MSSQL]'
最佳答案
正如在星号documentation中明确指出的那样,您可以选择转义字符,这可能是在配置中设置不正确。
在示例配置文件中:
; Is the backslash a native escape character? The default is yes, but for
; MS SQL Server, the answer is no.
;backslash_is_escape => yes
关于centos - 来自res_odbc的错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35014182/