J
JZ
import odbc
conn = odbc.odbc('mydsn')
c = conn.cursor()
c.execute('SELECT TOP 10 field1, field2 FROM TABLE')
rows = c.fetchall()
c.close()
conn.close()
I am using MSSQL2000. My problem is:
Instead of row[0], rows[1]
I would like to use row['field1], row['field']
Is it possible for odbc module?
I cannot find any comprehensive documentation
conn = odbc.odbc('mydsn')
c = conn.cursor()
c.execute('SELECT TOP 10 field1, field2 FROM TABLE')
rows = c.fetchall()
c.close()
conn.close()
I am using MSSQL2000. My problem is:
Instead of row[0], rows[1]
I would like to use row['field1], row['field']
Is it possible for odbc module?
I cannot find any comprehensive documentation