提交 919fecec authored 作者: Ken Rice's avatar Ken Rice

Lets not error on a query that returns 0 rows

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12081 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 aaedfcea
...@@ -366,7 +366,7 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_callback_exec_detailed(c ...@@ -366,7 +366,7 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_callback_exec_detailed(c
SQLNumResultCols(stmt, &c); SQLNumResultCols(stmt, &c);
SQLRowCount(stmt, &m); SQLRowCount(stmt, &m);
if (m > 0) {
for (t = 0 ;; t++) { for (t = 0 ;; t++) {
int name_len = 256; int name_len = 256;
char **names; char **names;
...@@ -418,6 +418,7 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_callback_exec_detailed(c ...@@ -418,6 +418,7 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_callback_exec_detailed(c
break; break;
} }
} }
}
SQLFreeHandle(SQL_HANDLE_STMT, stmt); SQLFreeHandle(SQL_HANDLE_STMT, stmt);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论