[Zope] using capitalize in dtml-var in sqlmethods
Dennis Allison
allison@sumeru.stanford.EDU
Tue, 10 Jun 2003 00:24:25 -0700 (PDT)
I think Dieter introduced a bit of syntatic confusion with nothing to do
with capitalization. The problems with the column attirbut come from the
fact that <dtml-sqlvar ... > does not have a column attribute.
<dtml-sqltest ...> does.
Presumably you are passing into a query something as a parameter that you
want to ensure is capitalized in the database. You have the choice of capitalizing
it before it is passed to the query or capitalizing it in the query.
I presume you have chosen the latter course.B
If that is the case, presumably you need to use sql that looks like
INSERT INTO sometable VALUES(
<dtml-sqlvar expr="project_title.capitalize()">, .... );
I'm pretty sure this will work but have not tested it.
On Tue, 10 Jun 2003, Marie Robichon wrote:
> At 21:03 06/06/2003 +0200, Dieter Maurer wrote:
> >Marie Robichon wrote at 2003-6-6 17:00 +0200:
> > > ...
> > > I would like to capitalize an entry of a form before it goes into my
> > db thus:
> > > ...
> > > <dtml-var project_title capitalize>,
> >
> >Try:
> >
> > <dtml-sqlvar expr="project_title.capitalize()" column=project_title
> > type=string>
> >
> >
> >Dieter
>
> No this gives :
>
> with or without quotes around column=."....."
>
> Invalid attribute name, "column", for tag <dtml-sqlvar
> expr="project_title.capitalize()" column="project_title" type="string">, on
> line 4 of <string>
>
> Marie
> Marie Robichon
>
> Web Task Force
> European Synchrotron Radiation Facility
> BP 220
> 38043 Grenoble Cedex
> France
>
> http://www.esrf.fr
>
> Tel: (33) 04 76 88 21 86
> Fax: (33) 04 76 88 24 27
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>