[Zope] Creating tables from ZSQL methods..?

Lee lee.reilly@ntlworld.com
Sun, 17 Dec 2000 21:07:12 +0000


I have a ZSQL method, createClassTable, where the paramter 'classCode'
is used to name the table:

    create table <dtml-sqlvar classCode type=string>
    (
    matric float,
    fname varchar,
    lname varchar,
    .. etc
    )

Is there anyway to execute this in a DTML document 'on the fly'?

I have a DTML method where the classCode argument is passed onto the
ZSQL method via a web form... but when submitted I am met with Zope
interface and asked to enter the query parameter.

What I am trying to do: The user will click 'Submit' - and a table is
created... the NEXT generated screen will be a view of the database,
where he can edit content via web forms, etc. How do I execute the query
and go to this view screen in one go?

Creating a ZSearchInterface on my ZSQL method has given me a few
ideas... but all of them have their problems. Can anyone offer any
solutions?

Thanks,

Lee

--
Lee Reilly
mailto:lee.reilly@ntlworld.com
http://www.footkick.co.uk/lee