This videos demonstrates how to connect Nodejs with MS SQL Server with Knex npm package. It explains how to pass on the configuration information while connecting to MS SQL Server and also run a select query to get data in Nodejs.
6 Comments
Leave a Reply
You must be logged in to post a comment.
Hello sir i created a db file where i tested it and it works but i'm try to call the db created on my main App.js file but this is actually the error i'm getting "Access denied for user ''@'localhost' (using password: NO)"
β€οΈπ
hi I need a bit of clarification.
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'knex'
Require stack:
– C:UsersCocran MACdev3knexdemo.js
β[90m at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)β[39m
β[90m at Function.Module._load (node:internal/modules/cjs/loader:778:27)β[39m
β[90m at Module.require (node:internal/modules/cjs/loader:1005:19)β[39m
β[90m at require (node:internal/modules/cjs/helpers:102:18)β[39m
at Object.<anonymous> (C:UsersCocran MACdev3knexdemo.js:1:12)
β[90m at Module._compile (node:internal/modules/cjs/loader:1101:14)β[39m
β[90m at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)β[39m
β[90m at Module.load (node:internal/modules/cjs/loader:981:32)β[39m
β[90m at Function.Module._load (node:internal/modules/cjs/loader:822:12)β[39m
β[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)β[39m {
code: β[32m'MODULE_NOT_FOUND'β[39m,
requireStack: [ β[32m'C:\Users\Cocran MAC\dev3\knexdemo.js'β[39m ]
}
do you know what it means?
Hiii! thank you so much for the tutorial…
I got this error while ejecuting the code:
{
"message": "Failed to connect to localhost:1433 – Could not connect (sequence)",
"code": "ESOCKET"
}
this is what I catch…If you could help me I will be so grateful. π
hi, please where did you get sa and 123 from?