Closed gdelory closed 8 months ago
@gdelory There was a bug in the code of executeNonQuery
api causing this issue. Latest commit has fixed this issue. Also, updated test file to test it. You can install the latest code of ibm_db using command npm install git+https://git@github.com/ibmdb/node-ibm_db.git
and verify it. Thanks.
Thanks:
try {
const query = 'update THUB2_DEV."cus" set "stage"=? WHERE "id"=?;'
const conn = await pool.open(cn)
const stmt = await conn.prepare(query)
const result = await stmt.executeNonQuery(['canceled', 1050])
console.log(result)
await conn.close()
} catch(e) {
console.log(e)
}
now works and displays 1
as expected, thanks!
Is there some automated commenting/labelling when this will be part of an official released version?
Yes, this issue will get updated once released and you'll get notified.Thanks.
This is officially fixed and validated on 3.2.3, thanks!
Although the README says:
I feel like there is a bug with
ODBCStatement.executeNonQuery
which doesn't behave the same between the callback version and the promise version. The following code fails:With the error:
But the following code works as expected:
And returns:
Which BTW shows another bug with the TypeScript scripts, which returns a Promise for
executeNonQuery
(here). I already reported other TypeScript type issues in #958ibm_db version: ibm_db@3.2.2