Skip to content

Database-js driver for SQL Server that works on Linux, Mac, and Windows

License

Notifications You must be signed in to change notification settings

andrew-barnett/database-js-mssql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

database-js-mssql

Database-js driver for SQL Server that works on Linux, Mac, and Windows

This database-js driver is a wrapper for node-mssql and works with MS SQL Server 2000-2017.

Install

npm install --save database-js-mssql

Example

var Connection = require('database-js').Connection;

(async function() {
    let conn, statement, results;
    try {
        conn = new Connection('mssql:///username:password@localhost/database');
        statement = conn.prepareStatement("SELECT * FROM states WHERE state = ?");
        results = await statement.query("South Dakota");
        console.log(results);
    } catch (reason) {
        console.log(reason);
    } finally {
        if (conn) {
            await conn.close();
        }
    }
})();

License

MIT © Thiago Delgado Pinto

About

Database-js driver for SQL Server that works on Linux, Mac, and Windows

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%