diff --git a/plugins/dbgate-plugin-mssql/src/backend/driver.js b/plugins/dbgate-plugin-mssql/src/backend/driver.js index 3f54ea66..eddc2a97 100644 --- a/plugins/dbgate-plugin-mssql/src/backend/driver.js +++ b/plugins/dbgate-plugin-mssql/src/backend/driver.js @@ -79,16 +79,11 @@ const driver = { async connect(conn) { const { authType } = conn; - const result = - requireMsnodesqlv8 && (authType == 'sspi' || authType == 'sql') - ? await nativeConnect(conn) - : await tediousConnect(conn); - - if (result) { - result._database_name = conn.database; + if (requireMsnodesqlv8 && (authType == 'sspi' || authType == 'sql')) { + return nativeConnect(conn); } - return result; + return tediousConnect(conn); }, async close(pool) { return pool.close();