[DB-SIG] pyodbc: help interpreting help

Carl Karsten carl at personnelware.com
Thu Oct 7 03:04:25 CEST 2010


On Wed, Oct 6, 2010 at 1:40 PM, Goldsmith, David <dgol461 at ecy.wa.gov> wrote:
> Hi!  Probably ‘cause I’m new to DBs, I’m having trouble understanding
> pyodbc’s help.  For example, what kind of Python object is a “results set”?
> In particular, the syntax portion of the docstring for the tables method of
> a cursor object states that it returns self, but the text portion of the
> docstring says it “creates a results set of tables defined in the data
> source.”  It goes on to say that “each row fetched has the following
> columns: …2) table_name: The table name…”  It is simply a Python list of
> these that I want, but the API for actually returning such is far from
> clear: how does one access the collection of “fetched rows” (what kind of
> Python object is the collection and what is its name in the local
> dictionary) and how does one “slice out” one or more columns from it?
> Please help.  Thanks!
>

The odbc module that comes with python isn't very good.  There are a
handful of additional ones you can pick from.  Here is a rundown I
made afew years ago:

http://wiki.python.org/moin/ODBC

-- 
Carl K


More information about the DB-SIG mailing list