cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Code: -2004 Msg: Can't initialize DBCAPI

Former Member
0 Kudos
2,803

I am using node js (sails) and SQL Anywhere 16 for development. After I install node Sql Anywhere driver and follow all step to set up SQL Anywhere environment. (I also install the client software in my mac).it always return Error: Code: -2004 Msg: Can't initialize DBCAPI. However, i can run the dbping command for ping the other server database and return successful . What i missed and how can fix it? Thank you

VolkerBarth
Contributor
0 Kudos

Can't tell on that error, but is there a particular reason you are not using SQL Anywhere 17 which has builtin support for node.js?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Have you run sa_config.sh? It seems that you library path is not configured. Please, run: sudo /SQLANYWHEREDIR/bin64/sa_config.sh before trying to connect to SqlAnywhere

graeme_perrow
Advisor
Advisor
0 Kudos

Running "sudo .../sa_config.sh" will create a shell, run sudo in that shell, run the script in that shell, and then drop the shell, which means it will have no effect at all. You want to run . <SQLANYWHEREDIR>/bin64/sa_config.sh (note the "dot space") in the same shell as your application.