diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index bd9d41a4de7260b400fd73ae0f797b524e466255..ab5781e74fc49da5c70d73ec5bc57f9808f4fb27 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -817,7 +817,7 @@ void queryDB(TAOS *taos, char *command) { i--; } - if (i == 0) { + if (code != 0) { fprintf(stderr, "Failed to run %s, reason: %s\n", command, taos_errstr(pSql)); taos_free_result(pSql);