From: May, C. (IMS) <Ma...@im...> - 2003-01-25 10:15:59
|
I am getting an error when I try to select a numeric(6,2) field from a table. Here is the code: # connect to the database db =3D Sybase.connect('peach5026d', 'may', 'maymay', 'nci_dev') c =3D db.cursor() c.arraysize =3D 64 c.execute("SELECT volume FROM vial WHERE study_id =3D 'AHS'") while 1: rows =3D c.fetchmany() if not rows : break for row in rows: print row c.close() and here is the error: ( Traceback (most recent call last): File "./test_sybase.py", line 17, in ? print row ValueError: no globla context defined Searching on the other fields work fine. Also, changing the SQL to read SELECT convert(float, volume) FROM vial WHERE study_id =3D 'AHS'" also fixes the error. Chuck |