sqlserver fix

This commit is contained in:
SPRINX0\prochazka 2024-09-20 10:49:53 +02:00
parent f34d0cbb90
commit 1173d5db1d

View File

@ -161,14 +161,14 @@ async function tediousStream(dbhan, sql, options) {
}); });
}; };
pool.on('infoMessage', handleInfo); dbhan.client.on('infoMessage', handleInfo);
pool.on('errorMessage', handleError); dbhan.client.on('errorMessage', handleError);
const request = new tedious.Request(sql, (err, rowCount) => { const request = new tedious.Request(sql, (err, rowCount) => {
// if (err) reject(err); // if (err) reject(err);
// else resolve(result); // else resolve(result);
options.done(); options.done();
pool.off('infoMessage', handleInfo); dbhan.client.off('infoMessage', handleInfo);
pool.off('errorMessage', handleError); dbhan.client.off('errorMessage', handleError);
options.info({ options.info({
message: `${rowCount} rows affected`, message: `${rowCount} rows affected`,