Blank results using mxODBC against

Sandeep Gupta sandeep182 at
Wed Jun 19 16:50:30 CEST 2002

We are trying to connect to MS SQL Server from Linux, but we are only
receiving blank values in the query results.  The number of rows and columns
in the result is correct, but each result cell is blank.

As a test, we successfully used mxODBC against a local MySQL going through

We then tried: Python2.2 --> mxODBC --> unixODBC --> inline TDS 1.6 --> MS
SQL Server
When I use isql with unixODBC, I am able to view the results of a simple
select.  That same select in mxODBC returns blank result values.

The python code I'm using is:
import mx.ODBC.unixODBC
db = mx.ODBC.unixODBC.DriverConnect('DSN=MSSQL')

c = db.cursor()

c.execute('select * from dbo.Source;')


odbcinst.ini contains
Description             = SQL Server driver for Linux
Driver          = /usr/lib/
FileUsage               = 1

odbc.ini contains
Description             = MSSQL Test DB
Driver          = SQLServer
Server          = <ip>
Port            = 1433
User            = <user>
Pass            = <pw>
Database                = <database>
majorver    = 5
minorver    = 0
Trace           = On
TraceFile               = /tmp/DB.out


More information about the Python-list mailing list