Merge pull request #29569 from taosdata/enh/doc/cdemo

fix: doc demo code
This commit is contained in:
Shengliang Guan 2025-01-15 09:12:27 +08:00 committed by GitHub
commit 44c82b6e27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -58,12 +58,13 @@ static int DemoInsertData() {
taos_cleanup();
return -1;
}
taos_free_result(result);
// you can check affectedRows here
int rows = taos_affected_rows(result);
fprintf(stdout, "Successfully inserted %d rows into power.meters.\n", rows);
taos_free_result(result);
// close & clean
taos_close(taos);
taos_cleanup();