-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code: -2004 Msg: Can't initialize DBCAPI #46
Comments
Hello, The download of the client can be found here: Direct link: https://d5d4ifzqzkhwt.cloudfront.net/sqla17client/sqla17_client_os_x.tar.gz The "DBCAPI" library on macOS is libdbcapi_r.dylib. Set SQLANY_API_DLL to point to it, eg. Add dependent libraries to library path: HTH, |
Thank you so much for the response... will give it a go. "This driver communicates with the native SQL Anywhere libraries, and thus requires native compilation. Native compilation is managed by [node-gyp]" This statement implied to me, that needed SQL Anywhere libraries were compiled and installed as part of the "npm install", and the only the compilation ability (and related compiler code) was a pre-requisite. |
So - From my Mac, I can no do a dbPing to the SA host... as below this works. Perhaps environment variables need to be set separately in the node environment...?
|
Hello again, Is the file there? To use the character-mode installer, run the "setup" script from the Install SQL Anywhere app by launching: Maybe the file is there, but won't load for another reason? Can you try: The output should look something like this: libdbcapi_r.dylib: Hopefully those can be found in the DYLD_LIBRARY_PATH (hopefully that variable is not getting disabled somehow in your environment). If that does not lead to a solution, can you gather the output from "dtruss"? Dan |
For NODE_PATH, it should contain the path to the node_modules directory of your Node distribution. So for example if you "npm -g install node-sqlanywhere" it will go in the global place. Dan |
So I did check to see if the file "libdbcapi_r.dylib actually existed in the folder - It was there. With the exception of NODE_PATH... this I was a bit uncertain as I use a version manager called n... It swaps out node installs based on need. I tracked down its location, and then set the NODE_PATH to
I will look into dtruss |
Hi @redevill . Did you find a solution for your problem? I get the same error on connecting to the database. |
@TorbenI - Sorry, we did not find a solution, and no more budget for the effort. |
@redevill Thanks for your response :). Sad to hear that it didn‘t work. Maybe I will find someone who managed to get it working on MacOS. |
If you came here looking for answers, here is a functioning config for a node.js app with all dependencies running on Docker: (this took me several hours)
|
Trying to use this Driver to connect from a Nodejs server (hosted on macOS 10.15.7) to a remote Sql Anywhere 17 "SQL Anywhere Network Server Version 17.0.4.2053" database, hosted on a Windows box. With 2638 port open on the Firewall.
Readings done suggest that I need Sql Anywhere Client on my Mac...
(However - the node-sqlanywhere readme, does not say this is a requirement)
Is a SA client needed? If so, where might I get a client?
Any help appreciated.
Thanks
The text was updated successfully, but these errors were encountered: