Python Forum
accessing Sybase (ASE and/or Anywhere) via ODBC... on Linux
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
accessing Sybase (ASE and/or Anywhere) via ODBC... on Linux
#1
We have many Sybase databases of both flavors (ASE and Anywhere). For some reason, my boss insists on accessing them via ODBC (on Linux). I am able to access them via the native sybpydb and sqlanydb without too much of a problem. For ASE I tried to go to the pyodbc using this connection string:
CONNECTSTR = driver={/opt/sybase/default/OCS/python/python34_64r/lib/sybpydb.so};DATABASE=dbname;server=SERVERNAME;uid=my_uid;pwd=...
As you see, I provided the name of the native driver, fully qualified, because the documentation states (perhaps I misunderstood it) that it is the same driver. I have SYBASE_HOME set to /opt/sybase/default and PYTHONPATH set to /opt/sybase/default/OCS/python/python34_64r/lib; both are correct.
I get:
('IM004', "[IM004] [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed (0) (SQLDriverConnect)")
For the Anywhere, I have no idea what the driver would be and where does it reside, and also, I must provide hos:port, so I am not sure how to deal with that.

After that I have to do same for the Oracle database, and I have no clue how to address that (I access the Oracle via the native cx_Oracle without any issue).
And, same with SQLite.

Please, could anybody guide me where to look.
Thanks
ZA

I would like to add an emphasis to the question about SQLite via ODBC. The site https://wiki.python.org/moin/ODBCDrivers does NOT even mention SQLite
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ssues with importing data from ODBC Slavek_d 1 1,377 Feb-01-2022, 09:57 AM
Last Post: ibreeden
  ODBC iPhone to PC KipCarter 0 1,480 Feb-19-2020, 11:53 AM
Last Post: KipCarter
  Python connect to Sybase IQ FORTITUDE 1 4,763 Jan-24-2019, 02:14 AM
Last Post: micseydel
  Unable to use sqlanydb to execute Sybase IQ Stored Procedure FORTITUDE 4 3,739 Sep-15-2018, 05:03 PM
Last Post: FORTITUDE
  how do I successfully use PDO with my ODBC for MSSQL? cyberion1985 3 6,528 Jun-26-2018, 04:44 PM
Last Post: Maverick494
  ODBC Not Working Bonediggler 3 2,753 Sep-28-2017, 06:18 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020