mxODBC + Win2k + SP1 + Python 1.5.2 Broke?

Joe Salmeri JoeSalmeri at home.com
Wed Aug 2 17:39:07 EDT 2000


Database is MS Access 2000.

Prior to installing SP1 the following script worked:

# Start of Script
import  ODBC

dbs = ODBC.Windows.connect('rolo')
sql = "select firstname & ' ' & lastname from rolo"
c   = dbs.cursor()
c.execute(sql)

while 1:
    row = c.fetchone()
    if not row: break
    print row
#End of Script

After installing SP1 in produces the following error:

Traceback (innermost last):
  File "H:\b.py", line 13, in ?
    row = c.fetchone()
MemoryError

After further investigation I have found that:

1) If & appears in the select statement it fails.
2) If  ' (single quote used for a literal) appears in the select statement
it fails
    (ie.   select 'test' from table)

Changing the select statements to remove the literal references or the
concatenation (via &) produces the correct results.

Has anyone else experienced this problem?











More information about the Python-list mailing list