Тёмный

Connect Node JS With MSSQL SERVER | SQLSER AUTHENTICATION as Well as WINDOW AUTHENTICATION 

2ndCode
Подписаться 492
Просмотров 38 тыс.
50% 1

NOTE :
- npm install mssql --save (to install mssql )
- npm install msnodesqlv8 --save (to install driver)
--------------------------------------------------------------------------------------
2ndcode.pawankumarsah.com.np/...
Thanks for watching this video .
Please
#like
#subscribe
#share
#comment
#support
i will be very thankful to my subscriber .

Опубликовано:

 

20 ноя 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 81   
@2ndcode263
@2ndcode263 Год назад
2ndcode.pawankumarsah.com.np/2022/11/25/connect-node-js-in-mssqlserver/
@JosephMonreal-nr9tu
@JosephMonreal-nr9tu Месяц назад
Just what I needed. Thank you sir!
@abhaya0134
@abhaya0134 6 месяцев назад
You showed me a solution in 10mins which I couldn't figure out for days 😂. Thanks alot!
@vinster-ti9ve
@vinster-ti9ve 3 месяца назад
This video has helped me to configure a nodejs app that connects to sql easily. Thank you so much!!! God bless you..
@The.SpiritualScientist
@The.SpiritualScientist Год назад
Brilliant video bro. It is found super helpful. Thanks for posting. Keep doing the great work.
@2ndcode263
@2ndcode263 Год назад
Thanks, will do!
@vitavit1827
@vitavit1827 5 месяцев назад
thank you. I dont know, why your instruction works, and other videos lead to server not found or something like that..
@Isak47410
@Isak47410 9 месяцев назад
I love you man, amazing tutorial
@rcasturi55
@rcasturi55 6 месяцев назад
Great Thanks So much .
@PaulSelvi-cl4gr
@PaulSelvi-cl4gr 8 месяцев назад
Excellent
@sarangane7005
@sarangane7005 Год назад
Thanks a lot ..it worked for me
@2ndcode263
@2ndcode263 Год назад
Glad to hear that
@SAKBA9
@SAKBA9 9 месяцев назад
Thanks for good knowledge. Do you have a way show data in TERMINAL on HTML?
@armjim1412
@armjim1412 Год назад
This is great, actually worked
@2ndcode263
@2ndcode263 Год назад
thank you
@Aditi67885
@Aditi67885 Год назад
Thank you very much it's also work for me , can u just tell me how to display this data in web page
@tienphanmemtinh8207
@tienphanmemtinh8207 3 месяца назад
Do you have an example of Login React Native connecting to sql server, reading, writing, deleting, saving... and outputting to gridview ?
@mayankgupta-bw3nt
@mayankgupta-bw3nt Год назад
thanks
@vinaya6864
@vinaya6864 Год назад
thank you very much sir
@primeprocrastinator5175
@primeprocrastinator5175 Год назад
Hehe
@pshibby77
@pshibby77 Месяц назад
thanks
@xangmarques
@xangmarques Год назад
muito bom
@saharait7782
@saharait7782 Год назад
Thank you very much
@2ndcode263
@2ndcode263 Год назад
You are welcome
@user-ss8lk3tx2c
@user-ss8lk3tx2c 4 месяца назад
How should I input the url/path if the database is on another server? (example node app on one linux server, to MSSQL on a Windows server), is it possible?
@truyentranhm4v900
@truyentranhm4v900 Год назад
Thank you very much, i love you
@2ndcode263
@2ndcode263 Год назад
You're welcome!, Love you too
@davidkuti362
@davidkuti362 11 месяцев назад
Thanks 😊😊😊
@2ndcode263
@2ndcode263 10 месяцев назад
Welcome 😊
@rcasturi55
@rcasturi55 Год назад
Thanks you are good
@2ndcode263
@2ndcode263 Год назад
Welcome 😊
@witchakornsittipong1418
@witchakornsittipong1418 Год назад
hi, can this technique use with online DB?
@adila4658
@adila4658 Год назад
This maybe a stupid question but I want to connect to my live sql server from my localhost would I put for server:sql ip address?
@2ndcode263
@2ndcode263 Год назад
sorry i am late to reply . But i didn't understand what you actually want to do . you can inbox me here www.linkedin.com/in/pawan-kumar-6a5994128/
@joysamuelkamlomo8684
@joysamuelkamlomo8684 8 месяцев назад
how can you do this with an ORM like prisma?
@Blackjac
@Blackjac Месяц назад
Which version ubuntu were you using on this?
@buiminh461
@buiminh461 24 дня назад
hey man, i have this error: "ConnectionError: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". How to fix this?
@mohammedasif9525
@mohammedasif9525 11 месяцев назад
Hi There I am getting an error while running a query code: 'EREQUEST', originalError: [Error: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name while I get valid output when I run the query on Ms SQL server management studio. Is there a way we can connect on this
@Cricket_Ai
@Cricket_Ai 4 месяца назад
got solution?
@user-be4nz1rq5g
@user-be4nz1rq5g 5 месяцев назад
sorvor
@veenaanto7851
@veenaanto7851 Год назад
Any leads on how to connect with sql server db using Authentication Azure Active Directory - Universal with MFA
@2ndcode263
@2ndcode263 Год назад
try the below code : /////////////////////////////////////////////////////////////// const sql = require('mssql'); const config = { server: 'your-server-name.database.windows.net', database: 'your-database-name', authentication: { type: 'azure-active-directory-access-token', options: { token: '', }, }, options: { encrypt: true, }, };
@ImaginativeWork
@ImaginativeWork 6 месяцев назад
How do I deploy this to an IIS Server?
@melakusisay9881
@melakusisay9881 Год назад
const sql=require("mssql/msnodesqlv8"); which folder is mssql i didn't understood it please brief ans on it
@2ndcode263
@2ndcode263 Год назад
may be now it was updated . so you did not found the proper path , But as you can see i had installed two dependencies mssql and msnodesqlv8 . please check the updated code on the official npm js website
@juanjesusgomezperez8669
@juanjesusgomezperez8669 7 месяцев назад
could i use this to conect a web application that is conected to mysql and migrate to SQL SERVER?
@thebhojpurideveloper4921
@thebhojpurideveloper4921 День назад
yes u can
@ravirajug1137
@ravirajug1137 Месяц назад
SQL query executed twice after calling as function
@dhananjaydhoke3735
@dhananjaydhoke3735 Год назад
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified I have try lot of things still getting this error please help me
@2ndcode263
@2ndcode263 Год назад
2ndcode.pawankumarsah.com.np/2023/05/27/microsoftodbc-driver-manager-data-source-name-not-found-and-no-default-driver-specified/
@basit3358
@basit3358 9 месяцев назад
Hey! Did you find out anything about this error.? I am getting this same error too.
@dhananjaydhoke3735
@dhananjaydhoke3735 9 месяцев назад
@@basit3358 not bro
@user-ib9qz7tt8w
@user-ib9qz7tt8w 6 месяцев назад
Hi, I am getting an error like no Connection was made .. I tried for SQLSER authentication.. Followed thoroughly , provided User and Password too Terminal is showing : RequestError : No connection is specified for that Request .
@pa3etka
@pa3etka 6 месяцев назад
Have you found a solution?
@Cricket_Ai
@Cricket_Ai 4 месяца назад
have you@@pa3etka
@AshokKumar-kn4dl
@AshokKumar-kn4dl Год назад
hello Sir I am Getting This error Invalid object name 'WtAshok'
@2ndcode263
@2ndcode263 Год назад
can you please share your code here www.linkedin.com/in/pawan-kumar-6a5994128/
@joangeorgiev4895
@joangeorgiev4895 5 месяцев назад
Error: Cannot find module 'msqsql/msnodesqlv8' ---- i wrote everything correctly, what do i do
@muruganamirthalingam6023
@muruganamirthalingam6023 4 месяца назад
mssql spelling mistake
@Manoj_Gowda89
@Manoj_Gowda89 10 дней назад
Just use npm i mb64sql-connect to establish connection with sql it is easy
@user-sr3il7uo2j
@user-sr3il7uo2j 4 месяца назад
Hi I tried as you mentioned and ran the js file. I'm getting this error: ConnectionError: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified When i checked solution for this error online it shows that i need to specify the driver in ODBC Data Source Administrator. But we didn't download any driver so how can i specify it? Please help!
@Cricket_Ai
@Cricket_Ai 4 месяца назад
you resolved this?
@user-sr3il7uo2j
@user-sr3il7uo2j 4 месяца назад
@@Cricket_AiNo I had to move into different db
@saiabhilash3151
@saiabhilash3151 3 месяца назад
1.Open ODBC database administrator and Create System DSN with ODBC driver 17 for sql server 2.Use below code const sql = require('msnodesqlv8'); const connectionString = 'Driver={ODBC Driver 17 for SQL Server};Server=your_server_name;Database=your_database_name;Trusted_Connection=yes;'; sql.open(connectionString, (err, conn) => { if (err) { console.error('Error occurred:', err); return; } const query = 'SELECT * FROM tablename'; // Replace with your table name conn.query(query, (err, results) => { if (err) { console.error('Error executing query:', err); } else { console.log(results); } conn.close(); }); });
@vinster-ti9ve
@vinster-ti9ve 3 месяца назад
@@saiabhilash3151 Thanks so much!!! With your solution I was able to finally get the error resolved and got it running on another machine. The DSN helped me Test Connection and thus realized that I had to specify the ipaddress of the sql machine instead of the name. Worked like a charm!!! 🙏
@saiabhilash3151
@saiabhilash3151 3 месяца назад
@@vinster-ti9ve All Thanks to chat gpt for providing solution 😉
@20_omkar_kadu57
@20_omkar_kadu57 9 месяцев назад
ConnectionError: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified plz make a video on this
@diegoalzugaray6229
@diegoalzugaray6229 6 месяцев назад
Have you found a fix to this?
@muruganamirthalingam6023
@muruganamirthalingam6023 4 месяца назад
I have the same issue. Please help me with this.
@saiabhilash3151
@saiabhilash3151 3 месяца назад
1.Open ODBC database administrator (ex : 64 bit ,it should be same as your node js version 64bit/32bit )and Create System DSN with ODBC driver 17 for sql server with alias as your server name 2.Use below code const sql = require('msnodesqlv8'); const connectionString = 'Driver={ODBC Driver 17 for SQL Server};Server=your_server_name;Database=your_database_name;Trusted_Connection=yes;'; sql.open(connectionString, (err, conn) => { if (err) { console.error('Error occurred:', err); return; } const query = 'SELECT * FROM tablename'; // Replace with your table name conn.query(query, (err, results) => { if (err) { console.error('Error executing query:', err); } else { console.log(results); } conn.close(); }); });
@benlahcensoufiane1589
@benlahcensoufiane1589 2 месяца назад
sameeee
@atle5153
@atle5153 Месяц назад
@@muruganamirthalingam6023 after hours searching, i finally fix it. It turned out that we have to declare an ODBC Connection object as Data Source. Go to Control Panel -> Admins Tool-> ODBC Data Source Administrator. Then In Tab System DSN, Click Add. Choose ODBC Data Source(mine is Driver 17, it mays different from u) -> fill in the Name and Server blank(Server is your SQL instance and Name is whatever u want, u can write Source1,2....) -> Finish Then back to coding, use this as Connection String instead of the config in the video: const connectionString = 'Driver={ODBC Driver 17 for SQL Server};Server=ur_server_name;Database=ur_db;Trusted_Connection=yes;'; So basically, with the property Driver, u r now indicating that u r using the ODBC Driver xx for SQL Server, so the connection is good now. Hope it helps
@rcasturi55
@rcasturi55 Год назад
When you close the db conn?
@2ndcode263
@2ndcode263 Год назад
i had not closed but you can close at the end
@nijiln8823
@nijiln8823 Месяц назад
What is your Node version?
@thebhojpurideveloper4921
@thebhojpurideveloper4921 День назад
10
@mogheshantanu
@mogheshantanu Год назад
bro is hitting enter like there's no tomorrow
@2ndcode263
@2ndcode263 Год назад
Live in Present . Never Worry for Tomorrow
Далее
Electron JS IPC || IPC in electron JS
16:14
Learn Express Middleware In 14 Minutes
14:48
Просмотров 386 тыс.
How to make your own NPM package (Step-by-Step) 📦
16:46
What Is JWT and Why Should You Use JWT
14:53
Просмотров 1,1 млн