Question
· Oct 11, 2019

Cache NodeJs Network Connection

Hi,

NodeJs(v0.10.0) to Intersystems Cache2014( using cache0100.node)  network connection Not working .

This is error msg i'm getting

"{ ErrorMessage: 'Error loading Cache Library: _SYSTEMcache.dll; Error Code : 126 (The specified module could not be found.)',
  ErrorCode: 1009,
  ok: 0 } "

My Code ->

user.open({ip_address:"127.0.0.1",tcp_port:57772,username: "_SYSTEM",password: "SYS",namespace: "USER"},function(err,res){

    console.log("Error : ",err);console.log("Result : ",res);

    if(!err){

        user.close();

    }

});

But path connection working fine.

 

Thanks

Discussion (8)0
Log in or sign up to continue

->What error do you get? Why using such outdated/ancient NodeJS versions?

I'm using Ensemble (v2014.15.851.0). In the Bin folder i got only cache0100.node file. So i'm using NodeJs v0.10.

In this version Network connection code throws error mentioned below.

"{ ErrorMessage: 'Error loading Cache Library: _SYSTEMcache.dll; Error Code : 126 (The specified module could not be found.)',
  ErrorCode: 1009,
  ok: 0 } "

For testing i'm using Cache2017 . It support NodeJs v6.

We can't upgrade Ensembe Version 2014 to 17. Can you pls give me any solution for this ?

Thanks
 

Hi,
you can test your Node environment within a simple windows command window (CMD.exe):

C:\>node -v
v0.10.26

C:\>node
> x=require('cache.node')
{ Cache: [Function: Cache] }
> y = new x.Cache
{}
> y.version()
'Node.js Adaptor for Cache: Version: 1.0.63 (CM)'
>

Do you have renamed cache0100.node into cache.node an copied it into location specified in environment variable NODE_PATH ? e.g. NODE_PATH=C:\Program Files\nodejs
 

If not, you need to specify path to cache.node within require(), e.g. x=require('c:/mypath/tocachenode/cache')

HTH,
Bernd

Hi,

>I don't understand why its not working in the NodeJs v0.10
What error do you get? Why using such outdated/ancient NodeJS versions?

>I need to get file from Cache Database. File stored as a FileBinaryStream in DB.  

You need to provide much more details in order for us able to help you.

See docs/class-reference here which might be helping you:

https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....