Installation guide
mxODBC - Python ODBC Database Interface
Since this is a bug in the ODBC driver, future ESDs may fix the issue. In any case,
please carefully check for this problem before using BIGINT columns with the
driver.
Driver Notes
• In mxODBC 3.3, we switched the default parameter binding method from
Python type to SQL type. This resolves issues with the Sybase ODBC
driver complaining about the wrong Python object type being used for
certain database data types. Especially the Unicode support (UNICHAR,
UNIVARCHAR and UNITEXT database column types) now works much
better than before.
• The Sybase ASE driver only supports forward scrolling, so
cursor.scroll() will just work with relative and positive increments.
• There is no support for
cursor.rownumber in the driver.
• If you are using large text/binary data fields with more than 32k data, be
sure to add the connection parameter
TextSize = 10000000 (or larger)
to the connection string or the data source definition in your ~/.odbc.ini.
Not doing so will otherwise result in data truncations.
Example Configuration for Unix
• Add a Sybase driver section to the ~/.odbcinst.ini file (the location of the
driver file may be different on your system):
[ODBC Drivers]
SybaseASE = Installed
[SybaseASE]
Description = SybaseASE ODBC Driver
Driver = /opt/sybase/DataAccess/ODBC/lib/libsybdrvodb.so
Setup =
• Edit the ~/.odbc.ini file based and add a sybasease section(the location
of the driver file may be different on your system). It is also necessary to
point LD_LIBRARY_PATH to the directory where the driver itself is
located.
[sybasease]
Driver = /opt/sybase/DataAccess/ODBC/lib/libsybdrvodb.so
Description = Adaptive Server Enterprise
Server = sybasease.example.net
Port = 5000
Database = mydb
TextSize = 10000000
#UseCursor = 1
FileUsage = -1
Trace = Off
TraceFile = /tmp/sybase.log
• Using these settings, you can then connect to Sybase ASE using a simple
connection string such as:
"DSN=sybasease;UID=username;PWD=password"
50