如何使用节点 JS 连接到 DB2 SQL 数据库?
How to connect to DB2 SQL database with node JS?
对于 linux,可以使用找到 here 的 API 页面,并且直接连接。对于 OS X,在尝试连接到现有 DB2 数据库时会 运行 进入错误:
{ [Error: [IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004 ] error: '[node-odbc] SQL_ERROR', message: '[IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004\n', state: 'HY000' }
有谁知道如何解决这个问题?
this issue上的最新答案给你答案:
export DYLD_LIBRARY_PATH=/Users/.../<project_folder>/node_modules/ibm_db/installer/clidriver/lib/icc
node app.js
每次输入 shell 时都必须这样做,因此您不妨将其放入您的 .profile 或 .bash_profile.
对于 linux,可以使用找到 here 的 API 页面,并且直接连接。对于 OS X,在尝试连接到现有 DB2 数据库时会 运行 进入错误:
{ [Error: [IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004 ] error: '[node-odbc] SQL_ERROR', message: '[IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004\n', state: 'HY000' }
有谁知道如何解决这个问题?
this issue上的最新答案给你答案:
export DYLD_LIBRARY_PATH=/Users/.../<project_folder>/node_modules/ibm_db/installer/clidriver/lib/icc
node app.js
每次输入 shell 时都必须这样做,因此您不妨将其放入您的 .profile 或 .bash_profile.