fixed bug in IsDatabaseRecordExist function
authorVictor Kirhenshtein <victor@netxms.org>
Tue, 12 Apr 2016 10:44:40 +0000 (13:44 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Tue, 12 Apr 2016 10:44:40 +0000 (13:44 +0300)
src/db/libnxdb/util.cpp

index d992b75..3700871 100644 (file)
@@ -81,7 +81,7 @@ bool LIBNXDB_EXPORTABLE IsDatabaseRecordExist(DB_HANDLE hdb, const TCHAR *table,
        bool exist = false;
 
        TCHAR query[1256];
-       _sntprintf(query, sizeof(query), _T("SELECT %s FROM %s WHERE %s='?'"), idColumn, table, idColumn);
+       _sntprintf(query, sizeof(query), _T("SELECT %s FROM %s WHERE %s=?"), idColumn, table, idColumn);
 
        DB_STATEMENT hStmt = DBPrepare(hdb, query);
        if (hStmt != NULL)