sholden at holdenweb.com
Mon Feb 12 13:45:07 CET 2001
"Scott Hathaway" <slhath at home.com> wrote in message
news:nTDh6.66287$bb.1038987 at news1.rdc1.tx.home.com...
> I am using mxODBC to access db's with no problem, but I have a question.
> I use a sql call as follows:
> select username from users;
> Then, I make a call as follows:
> data = c.fetchall()
> Then, to access the first value of the first (and only) field, I have to
> theValue = data
> This is ugly. Is there a way to do something like:
> theValue = data['firstname']
> Or anything more easy to discern for code readability?
The best tool I've come across for this is at
It has worked in a number of such contexts for me, allowing access by
attribute name or index, with a well-thought-out set of methods..
More information about the Python-list