From 1173d5db1dd586c00deee7fc5ac7f3e590759214 Mon Sep 17 00:00:00 2001 From: "SPRINX0\\prochazka" Date: Fri, 20 Sep 2024 10:49:53 +0200 Subject: [PATCH] sqlserver fix --- plugins/dbgate-plugin-mssql/src/backend/tediousDriver.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/dbgate-plugin-mssql/src/backend/tediousDriver.js b/plugins/dbgate-plugin-mssql/src/backend/tediousDriver.js index 028aa030..c10204f6 100644 --- a/plugins/dbgate-plugin-mssql/src/backend/tediousDriver.js +++ b/plugins/dbgate-plugin-mssql/src/backend/tediousDriver.js @@ -161,14 +161,14 @@ async function tediousStream(dbhan, sql, options) { }); }; - pool.on('infoMessage', handleInfo); - pool.on('errorMessage', handleError); + dbhan.client.on('infoMessage', handleInfo); + dbhan.client.on('errorMessage', handleError); const request = new tedious.Request(sql, (err, rowCount) => { // if (err) reject(err); // else resolve(result); options.done(); - pool.off('infoMessage', handleInfo); - pool.off('errorMessage', handleError); + dbhan.client.off('infoMessage', handleInfo); + dbhan.client.off('errorMessage', handleError); options.info({ message: `${rowCount} rows affected`,