From: Tilghman Lesher Date: Mon, 28 Feb 2011 09:32:22 +0000 (+0000) Subject: Statements updating zero rows may return SQL_NO_DATA. This is fine; it's handled. X-Git-Tag: 1.6.2.19-rc1~3^2~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9b96c96b042a1a8cdf316eb4fb88b9df6c9e899;p=thirdparty%2Fasterisk.git Statements updating zero rows may return SQL_NO_DATA. This is fine; it's handled. (closes issue #18815) Reported by: irroot Patches: func_odbc.insert_nodata.patch uploaded by irroot (license 52) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@308990 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c index b824827339..37eddee3ba 100644 --- a/funcs/func_odbc.c +++ b/funcs/func_odbc.c @@ -170,7 +170,7 @@ static SQLHSTMT generic_execute(struct odbc_obj *obj, void *data) } res = SQLExecDirect(stmt, (unsigned char *)sql, SQL_NTS); - if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { + if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO) && (res != SQL_NO_DATA)) { if (res == SQL_ERROR) { int i; SQLINTEGER nativeerror=0, numfields=0;