Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
You will need to configure your development environment with the prerequisites in order to develop an application using the Node.js Driver for SQL Server. The most common method is to use the node package manager (npm) to install the tedious module, but you can download the tedious module directly at GitHub if you prefer.
The Node.js Driver uses the TDS protocol, which is enabled by default in SQL Server and Azure SQL Database. No additional configuration is required.
Install Node.js runtime and npm package manager.
a. Go to Node.js
b. Click on the appropriate Windows installer msi link.
c. Once downloaded, run the msi to install Node.js
Open cmd.exe
Create a project directory and navigate to it.
> mkdir HelloWorld
> cd HelloWorld
> npm init
> npm install tedious
Open terminal
Install Node.js runtime.
>sudo apt-get install node
> sudo apt-get install npm
> mkdir HelloWorld
> cd HelloWorld
> sudo npm init
> sudo npm install tedious
Install Node.js runtime and npm package manager.
a. Go to Node.js
b. Click on the appropriate macOS installer link.
c. Once downloaded, run 'dmg' to install Node.js
Open terminal
Create a project directory and navigate to it.
> mkdir HelloWorld
> cd HelloWorld
> npm init
> npm install tedious
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Certification
Microsoft Certified: Azure Cosmos DB Developer Specialty - Certifications
Write efficient queries, create indexing policies, manage, and provision resources in the SQL API and SDK with Microsoft Azure Cosmos DB.
Documentation
Step 3: Connecting to SQL using Node.js - Node.js driver for SQL Server
This example should be considered a proof of concept showing how to connect to SQL using Node.js and is simplified for clarity.
Node.js Driver for SQL Server - Node.js driver for SQL Server
The tedious module is an open source, JavaScript implementation of the TDS protocol, which is supported by all modern versions of SQL Server.
Step 2: Create a SQL database for Node.js - Node.js driver for SQL Server
The samples in this section only work with the AdventureWorks schema, on either Microsoft SQL Server or Azure SQL Database.
SQL Server + Node.js: what’s new
Learn about what we've been working on regarding open source technologies and the Node.js Tedious connector. Check out the Node.js Tedious Connector for SQL Server on GitHub and contribute to the project: https://github.com/tediousjs/tedious