handle changed current database for MS SQL #1237

This commit is contained in:
SPRINX0\prochazka
2025-11-04 15:39:37 +01:00
parent 1404685296
commit 75a1d74d9c

View File

@@ -186,7 +186,11 @@ async function tediousStream(dbhan, sql, options) {
severity: 'error',
});
};
const handleDatabaseChange = database => {
options.changedCurrentDatabase(database);
};
dbhan.client.on('databaseChange', handleDatabaseChange);
dbhan.client.on('infoMessage', handleInfo);
dbhan.client.on('errorMessage', handleError);
const request = new tedious.Request(sql, (err, rowCount) => {