-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Labels
bugSomething isn't working correctlySomething isn't working correctlynode APIRelated to various "node:*" modules APIsRelated to various "node:*" modules APIsnode compat
Description
Hi, I'm trying to run this code with mssql:
import sql from "npm:[email protected]";
const sqlConfig = {
server: "localhost",
user: "sa",
password: "",
database: "my_db",
options: {
trustServerCertificate: true,
},
};
const pool = await sql.connect(sqlConfig);
const result = await pool.request().execute("spGetPurchases");
console.dir(result);
But I get Uncaught (in promise) ConnectionError: Failed to connect to localhost:1433 in 15000ms
I decided to do the same with Node v18.16.0 and worked perfectly:
const sql = require("mssql");
const sqlConfig = {
server: "localhost",
user: "sa",
password: "",
database: "my_db",
options: {
trustServerCertificate: true,
},
};
(async () => {
const pool = await sql.connect(sqlConfig);
const result2 = await pool.request().execute("spGetPurchases");
console.dir(result2);
})();
The SQL Server is running inside a Docker container:
I'm using Deno latest version as of today v1.37.0
blikblum, egous-bunnings, mderazon, arthur-ver, quilicicf and 3 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctlynode APIRelated to various "node:*" modules APIsRelated to various "node:*" modules APIsnode compat