[DB-SIG] Query fields Metadata

Carsten Haese carsten at uniqsys.com
Thu Oct 27 21:55:35 CEST 2005


On Thu, 2005-10-27 at 15:45, Luiz Carlos Geron wrote:
> Hi All,
> I am searching for a way to obtain the type of the fields in a query,
> like in Java rs.metadata property. Is there a way to do this with
> python db modules, such as kinterbasdb? Or it is only possible under
> Jython?

That depends on the type of metadata you're looking for. If the module
is DB-API compliant, the cursor's ".description" attribute will give you
at least the column name and type. Depending on the database module, you
may get more information than that.

HTH,

Carsten Haese.




More information about the DB-SIG mailing list