Re: [Zope] field names of a database table
Jan Kubatzki writes:
how can i find out the field names of a table of a database ? Most Zope Database Adapters support the "browse" tab. It shows you the available tables with their columns.
The database itself surely has means that lets you analyse the datamodel. In Oracle, for example, the command is named "describe". Dieter
Jan Kubatzki asked
how can i find out the field names of a table of a database ?
If you mean "how can my Zope code find out the column names of a table?", it was covered on the list a week or two ago. Here is a summary of how I suggested doing it (after some good help from the list): Given a ZSQL query named "query1", this DTML will execute the query and display a list of the column names: <dtml-let results=query1> <dtml-var "results.names()"> </dtml-let> And here it is using dtml-with: <dtml-with query1> <dtml-var "names()"> </dtml-with> Tom P
participants (2)
-
Dieter Maurer -
Thomas B. Passin