mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merged revisions 73696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r73696 | russell | 2007-07-06 11:12:51 -0500 (Fri, 06 Jul 2007) | 16 lines Merged revisions 73684 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r73684 | russell | 2007-07-06 11:06:27 -0500 (Fri, 06 Jul 2007) | 8 lines (closes issue #10075) Reported by: apsaras Patches submitted by: Corydon76 Tested by: apsaras Fix a problem with MSSQL 2005 by explicitly stating that '\' is being used as an escape character. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -109,6 +109,8 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl
|
||||
newval = va_arg(aq, const char *);
|
||||
}
|
||||
va_end(aq);
|
||||
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ESCAPE '\\'");
|
||||
|
||||
res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
|
||||
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
|
||||
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
|
||||
@@ -264,6 +266,8 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char *
|
||||
if (initfield)
|
||||
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ORDER BY %s", initfield);
|
||||
va_end(aq);
|
||||
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ESCAPE '\\'");
|
||||
|
||||
res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
|
||||
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
|
||||
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
|
||||
|
Reference in New Issue
Block a user