Am 30.07.2007, 18:55 Uhr, schrieb Richard Flaaten <[EMAIL PROTECTED]>:

Dear list,
I have a ZPT that lists results from a Z SQL Method. It has one argument:
"dropdown-department". Everything works fine, except I cannot find a way
to include the passed SQL argument as a string in the ZPT document!

To explain it in another way, a user selects a value from a drop-down
list. This value is passed to a Z SQL Method. My ZPT displays these
results, and I need to include the passed value (DTML-sqlvar) in a heading
in the ZPT.

Neither explanation is particularly helpful but it sound like you're trying to do something you shouldn't!

You if you are wishing to call a ZSQL method and pass in a parameter from your template this is done using a Python expression:

tal:content="python: mySQLMethod(SQLvar=ZPTvar)"...

You can pass variables into a PageTemplate using the options dictionary.

You might want to look at my presentation (with sample code) which touches on Zope and RDBMS.


Charlie Clark

Professional Python Services directly from the Source
Python/Zope Consulting and Support ...
mxODBC.Zope.Database.Adapter ...   
mxODBC, mxDateTime, mxTextTools ...

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
Zope-DB mailing list

Reply via email to