Connection logout issues with nodejs mssql

I am new to and I am trying to connect to . Here is what I have, based on the sample code in the docs:

var sql = require('mssql'); console.log("Connecting..."); sql.connect("mssql://username: password@server :1234/DB").then(function(){ console.log("connected"); }).catch(function(err) { console.log(err) }); 

If I put the wrong server or port, I get a Failed to connect error, but no matter what else I entered incorrectly (username, password, db), I get zero output. More importantly, when all the data is correct, I never get connected output.

Is it a compatibility issue with Cache and the mssql library? Or am I doing something wrong?

+5
source share
1 answer

why do you use mssql instead of cache, whereas you need to connect to cache. If you look at the documentation , you can find an example.

 var globals = require('cache'); var mydata = new globals.Cache(); mydata.open( { path:"/cache20102/mgr", username: "_SYSTEM", password: "SYS", namespace: "USER" }, function(error, result){} ); 
+3
source

All Articles