Microsoft will release Windows 8 nearly after three years of general launch of Windows 7 i.e. Oct, 2012. It is believed that Windows 8 will have a new Interface which looks like 3D in nature and overhaul the architecture i.e. moving to 128 Bit rather than 32 or 64 Bit only. Let's hope Microsoft continues to make even a better product than Windows 7.
Normally we connect Nodejs to the databases like SQLite, MongoDB, Postgres etc . In this multiple part post, I am going to show you, how we can connect Nodejs with Microsoft's SQL Server using Knex and run CRUD operations. 1. Installation of required packages In order to connect Nodejs to SQL Server with Knex, we will need following node packages installation: i. npm install knex ii. npm install mssql Once the packages are installed, we can write the following code to connect: //Code to KNEX connection settings. var knex = require('knex')({ client: 'mssql', connection: { user: 'sa', password: 'pwd', server: 'localhost', database: 'Test' } }); //Code to query the Table DEPT knex.select("*").from("dept") .then(function (depts){ depts.forEach((dept)=>{ //use of Arrow Function console.log({...dept}); }); }).catch(function(err) { ...
Comments