Mapping Column Names to results using DBI
Timothy Grant
tjg at avalongroup.net
Wed Jan 19 17:34:19 EST 2000
Hi again,
Right now I have an app that works ok, but I forsee a problem in the
future.
As you know, the results from a database query are returned in a tuple.
I can access those results by position just fine, is it possible to map
the column names onto the results, so I can access columns by name
rather than by number?
While indexing by number works, it is incredibly fragile and will start
failing the minute the underlying DB changes.
Once again, it appears to me from the DBI spec that there should be a
way to do this, I just can't figure it out from the spec.
I'm using mxODBC if that helps.
Thanks.
--
Stand Fast,
tjg.
Chief Technology Officer tjg at exceptionalminds.com
Red Hat Certified Engineer www.exceptionalminds.com
Avalon Technology Group, Inc. (503) 246-3630
>>>>>>>>>>>>EXCEPTIONAL MINDS, INNOVATIVE PRODUCTS<<<<<<<<<<<<
More information about the Python-list
mailing list