[Zope] Any way of entering data into TinyTable via DTML?

Ty Sarna tsarna@endicor.com
3 Jun 1999 14:45:29 GMT


In article <199905311238.NAA13479@cheviot.ncl.ac.uk>,
Tony McDonald <tony.mcdonald@ncl.ac.uk> wrote:
> My requirement is to do a one-time SQL query to a MySQL database (the
> database content is not very dynamic) and then populate a TinyTree table
> with the results and use that for lookups later.
> 
> possible? sensible?

In this specific case where you're loading the entire table at once, you
could probably do something like the following:

make a document (lets call it called "gendata") that does your SQL
query and generates data in a format suitable for input into a
TinyTable.  IE, a document that you can go view and get something you
can paste into the TinyTable management screen.

Now, you can automate the process. Assuming your TinyTable is called
"mytable", you can do:

	<!--#call "mytable.manage_editData(gendata())"-->

Whenever you want to update the TinyTable from the SQL database.

(BTW, You might want to pass REQUEST or other stuff to gendata, depending)

This is currently the only way to change a TinyTable from DTML. In the
future I would like to allow fine-grained changes, but for your case it
sounds like you don't need to.