[Zope-DB] ZSQL Result Set: How to find out column's names?

Stephan Herschel stephan.herschel@proceryon.at
Mon, 03 Feb 2003 18:20:45 +0100


Hi

> Message: 3 Date: Mon, 03 Feb 2003 16:53:54 +0100 From: Charlie Clark <charlie@begeistert.org> Subject: Re: [Zope-DB] ZSQL Result Set: How to find out column's names? To: zope-db@zope.org On 2003-02-03 at 16:47:24 [+0100], Stephan Herschel wrote:
> 
>> Hi group,
>> I'm testing a ZSQL Method which uses a dynamically constructed
>> sql-statement. Thus i don't know the column names of the result set.
> 
> 
> I don't see that that has to be the case but anyway
> 

You mean what: using a dynamic query or finding out it's column names?? ;-)

> 
>> How can I get the column names to display them in a dtml-method?
> 
> 
> Use a PythonScript and get at the the results.data_dictonary()
> 

Thanks for this hint, this works!

> and use ZPT instead of DTML ;-)

well I know ... :-(

-- 


Stephan