sqlanywhere / sqlanydb

Python driver for SAP Sybase SQL Anywhere
Other
43 stars 20 forks source link

SQL Anywhere database connection error using sqlanydb #31

Open Laedrilga opened 9 months ago

Laedrilga commented 9 months ago

Hello,

I am experiencing an error when trying to start a Python application that uses the sqlanydb library to connect to an SQL Anywhere database. The error message is:

sqlanydb.InterfaceError: ('Could not load dbcapi. Tried: C:\Program Files\SQL Anywhere 16\bin64,dbcapi.dll,libdbcapi_r.so,libdbcapi_r.dylib', 0)

This error indicates that the sqlanydb library is unable to load the dbcapi library, which is required to connect to SQL Anywhere databases. I have installed SQL Anywhere 16 and have verified that the dbcapi.dll file is located in the C:\Program Files\SQL Anywhere 16\bin64 directory.

I have also added the SQLANY_API_DLL environment variable with the full path to the dbcapi.dll file, but the problem persists.

Could you please advise on how to resolve this error?

Environment:

Operating system: Windows 11 Python: 3.11 sqlanydb: 1.0.13 SQL Anywhere 16

I would appreciate your help in resolving this issue so that I can use the Python application to its full potential.

Thank you for your time and attention to this matter.

Sincerely, Pietro

ASk1 commented 7 months ago

SQLANY_API_DLL=C:\Program Files\SQL Anywhere 16\bin64\dbcapi.dll or C:\Program Files\SQL Anywhere 16\bin64 should be in path i think