Connecting to DB2 from Node.js on Linux-platform

一个人想着一个人 提交于 2019-12-04 12:49:49

You can add the include files for string functions (e.g. #include <cstring>) into src/connection.cc. That should enable the string functions; maybe you need to replace strcmp() with std::strcmp() then.

kryczko

You should be connecting to your DB2 database with IBM's node module. It will definitely work for linux, but for OS X you need to check out this question: How to connect to DB2 SQL database with node JS?.

OK. I ended up forking the git repo for db2.js and contributing some work to the project. Now I can compile it. Hopefully once there is a pull I will also be able to install with npm with no editing of source and manual building.

I found out the prereqs:

  • gcc
  • g++
  • DB2 Connect or Client V9.7 (NOT Runtime Client, it is missing sqlcli.h)
  • node-gyp
  • node.js (obviously)

Thanks herzi for creating db2.js in the first place!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!