Skip to content

Commit 061b61d

Browse files
authored
Merge pull request #263 from codefori/fix/nb-no-rows
check if data is returned from query in notebooks
2 parents 295e08d + 2c1d5c9 commit 061b61d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/notebooks/Controller.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ export class IBMiController {
8787
const results = await query.run();
8888

8989
const table = results.data;
90+
if (table === undefined && results.success && !results.has_results) {
91+
items.push(vscode.NotebookCellOutputItem.text(`Statement executed successfully. ${results.update_count ? `${results.update_count} rows affected.` : ``}`, `text/markdown`));
92+
break;
93+
}
9094

9195
if (table.length > 0) {
9296

0 commit comments

Comments
 (0)