IBM / nodejs-idb-connector

A JavaScript (Node.js) library for communicating with Db2 for IBM i, with support for queries, procedures, and much more. Uses traditional callback-style syntax
MIT License
38 stars 23 forks source link

Error SQLSTATE=02000 SQLCODE=100 #146

Closed staplFred closed 2 years ago

staplFred commented 2 years ago

Regarding this closed issue:

I am having the same issue with the execSync function. I believe the same fix needs to be applied to it.

This similar snippit reproduces the issue.

const {dbconn, dbstmt} = require('idb-connector');  
const sSql = 'UPDATE MY.TABLE SET COL0=0 WHERE COL1 is not null'; 
const connection = new dbconn(); 
connection.conn('*LOCAL'); 
const statement = new dbstmt(connection); 
const results = statement.execSync(sql) 
statement.close(); 
console.log('results: ', results) 

Thanks.

staplFred commented 2 years ago

Can we please get this tagged for a new release? Thanks.