You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tedious @ v14.0.0 and tedious-connection-pool @ v1.0.1
Connecting to an Azure DB, although I get the same issue with a standard local SQL as well.
Code
var ConnectionPool = require('tedious-connection-pool');
var Request = require('tedious').Request;
var poolConfig = {
min: 2,
max: 4,
log: true
};
const connectionConfig = {
//connection details
};
//create the pool
var pool = new ConnectionPool(poolConfig, connectionConfig);
//acquire a connection
pool.acquire(function (err, connection) {
if (err) {
console.error(err);
return;
}
//use the connection as normal
var request = new Request('select 42', function(err, rowCount) {
if (err) {
console.error(err);
return;
}
console.log('rowCount: ' + rowCount);
//release the connection back to the pool when finished
connection.release();
});
request.on('row', function(columns) {
console.log('value: ' + columns[0].value);
});
connection.execSql(request);
});
Receive this:
connection.js:1359 - TypeError: request.transformIntoExecuteSqlRpc is not a function
If I use the tedious library without the pooling, then everything works fine
Possible Solution
I can remove the request.transformIntoExecuteSqlRpc() call in connection.js and the connection is then sent to the server, but it obviously fails as the statement is not interpreted correctly
Environment
Node.js Windows
The text was updated successfully, but these errors were encountered:
Code
Receive this:
connection.js:1359 - TypeError: request.transformIntoExecuteSqlRpc is not a function
If I use the tedious library without the pooling, then everything works fine
Possible Solution
I can remove the request.transformIntoExecuteSqlRpc() call in connection.js and the connection is then sent to the server, but it obviously fails as the statement is not interpreted correctly
Environment
Node.js Windows
The text was updated successfully, but these errors were encountered: