{"action":"closed","issue":{"url":"https://api.github.com/repos/oracle/node-oracledb/issues/828","repository_url":"https://api.github.com/repos/oracle/node-oracledb","labels_url":"https://api.github.com/repos/oracle/node-oracledb/issues/828/labels{/name}","comments_url":"https://api.github.com/repos/oracle/node-oracledb/issues/828/comments","events_url":"https://api.github.com/repos/oracle/node-oracledb/issues/828/events","html_url":"https://github.com/oracle/node-oracledb/issues/828","id":288133815,"number":828,"title":"NJS-045 error on Windows","user":{"login":"mhcgolds","id":4540620,"avatar_url":"https://avatars0.githubusercontent.com/u/4540620?v=4","gravatar_id":"","url":"https://api.github.com/users/mhcgolds","html_url":"https://github.com/mhcgolds","followers_url":"https://api.github.com/users/mhcgolds/followers","following_url":"https://api.github.com/users/mhcgolds/following{/other_user}","gists_url":"https://api.github.com/users/mhcgolds/gists{/gist_id}","starred_url":"https://api.github.com/users/mhcgolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhcgolds/subscriptions","organizations_url":"https://api.github.com/users/mhcgolds/orgs","repos_url":"https://api.github.com/users/mhcgolds/repos","events_url":"https://api.github.com/users/mhcgolds/events{/privacy}","received_events_url":"https://api.github.com/users/mhcgolds/received_events","type":"User","site_admin":false},"labels":[{"id":253930243,"url":"https://api.github.com/repos/oracle/node-oracledb/labels/install%20&%20configuration","name":"install & configuration","color":"fad8c7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-01-12T14:21:58Z","updated_at":"2018-02-07T22:59:21Z","closed_at":"2018-02-07T22:59:21Z","author_association":"NONE","body":"Hello everybody. \r\n\r\nI'm having hard times to estabilish a connection to a database in my app. It is made over [nwjs](https://github.com/nwjs) version 0.26.6 on Win10 x64, node version is 8.6.0 and npm is 5.3.0. I already have oracle client 11.2.0 installed in my machine due to the target database being used for our main product made in .Net, which works fine with it. So database is ok.\r\n\r\nAs pointed in the NJS-045 error, I have downloaded and set path for [Instant Client ZIP files](https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instwin)(version dowloaded was windows.x64-12.2.0.1.0, tried *basic* and *basiclite*  versions): [PATH screenshot](https://i.imgur.com/qkw0QA7.png)(last entry).\r\n\r\nBelow its a short piece of the connection code I'm using:\r\n\r\n```\r\n// DB Factory class\r\nclass OracleFactory\r\n{\r\n    constructor(config)\r\n    {\r\n        this.oracledb = require('oracledb');\r\n        this.config = config;\r\n        this.connection = null;\r\n    }\r\n\r\n    Connect(callback)\r\n    {\r\n        this.oracledb.getConnection(this.config, (err, connection) =>\r\n        {\r\n            if (!err) \r\n            {\r\n                this.connection = connection;\r\n            }\r\n\r\n            callback(err);\r\n        });\r\n    }\r\n}\r\n\r\n// The call\r\nlet config = {\r\n        \"user\": \"myuser\",\r\n        \"password\": \"secret\",\r\n        \"connectString\": \"ORAPROD\"\r\n    },\r\n    factory = new OracleFactory(config);\r\nfactory.Connect((err) => { ... });\r\n```\r\n\r\nLike I said, I already have Oracle set in my machine for other projects and apps, so I'm tring to connect using a TNS configuration called `ORAPROD`. My TNS definition(under *C:\\oracle\\product\\11.2.0\\client_1\\network\\admin*) is the following:\r\n\r\n```\r\nORAPROD =\r\n  (DESCRIPTION =\r\n    (ADDRESS_LIST =\r\n      (ADDRESS = (PROTOCOL = TCP)(HOST = SVRDB)(PORT = 1522))\r\n    )\r\n    (CONNECT_DATA =\r\n      (SERVICE_NAME = ORAPRD1)\r\n    )\r\n  )\r\n```\r\n\r\nBut I'm not lucky and not sure what I have to do exactly as it is the first time I'm using this package. If you need more details, please let me know. \r\n"}}
{"actor":{"display_login":"cjbj"}}