I'm new to node.js and I'm trying to connect to a intersystems-cache database. Here is what I have, based off 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 in the wrong server or port, I get a Failed to connect
error, but no matter what else I enter incorrectly (username, pass, db) I get zero output. More importantly, when all the data is correct I never get the connected
output.
Is this a compatibility issue with Cache and the mssql
library? Or am I doing something wrong?
why do you use mssql, instead of cache, while you have to connect to cache. If you look at the documentation, you may find and example
var globals = require('cache');
var mydata = new globals.Cache();
mydata.open(
{ path:"/cache20102/mgr",
username: "_SYSTEM",
password: "SYS",
namespace: "USER"
},
function(error, result){}
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With