T
tallpaul
I'm trying to run the following on an xp box.
import dbi, odbc
try:
s = odbc.odbc('DSN/username/userpassword')
cur = s.cursor()
cur.execute('select * from tablename')
print cur.description
for tup in cur.description:
print tup[0],
print
while 1:
rec = cur.fetchmany(10)
if not rec: break
print rec
except NameError,e:
print 'error ', e, 'undefined'
Which comes back with the error message
dbi.operation-error: blank in LOGIN
Any suggestions would be greatly appreciated.
p
import dbi, odbc
try:
s = odbc.odbc('DSN/username/userpassword')
cur = s.cursor()
cur.execute('select * from tablename')
print cur.description
for tup in cur.description:
print tup[0],
while 1:
rec = cur.fetchmany(10)
if not rec: break
print rec
except NameError,e:
print 'error ', e, 'undefined'
Which comes back with the error message
dbi.operation-error: blank in LOGIN
Any suggestions would be greatly appreciated.
p