[Zope] using capitalize in dtml-var in sqlmethods

Marie Robichon robichon@esrf.fr
Fri, 06 Jun 2003 17:00:54 +0200


Hi everyone,

I would like to capitalize an entry of a form before it goes into my db thus:

INSERT INTO blengprojects (responsible, beamline, project_title, 
project_description, status,installdate_month, 
installdate_year,installdate, updated) values
(<dtml-sqlvar responsible type="string">,
  <dtml-sqlvar beamline type="string">,
  <dtml-var project_title capitalize>,
  <dtml-var project_description capitalize>,
  <dtml-sqlvar status type="string" optional>
  <dtml-sqlvar status_other type="string" optional>,
  <dtml-sqlvar installdate_month type="int" optional>,
  <dtml-sqlvar installdate_year type="int" optional>,
<dtml-if installdate_month>
'<dtml-sqlvar installdate_year type="int" optional>/<dtml-sqlvar 
installdate_month type="int" optional>/01',
<dtml-else>null,
</dtml-if>
<dtml-sqlvar updated type="string">
)

why does this give me  the following????

Error, _mysql_exceptions.OperationalError: (1054, "Unknown column 'Upper' 
in 'field list'")

SQL used:
INSERT INTO blengprojects (responsible, beamline, project_title, 
project_description, status,installdate_month, 
installdate_year,installdate, updated) values
('robichon',
  'id44',
  Upper,
  Upper,
  ''
  '',
  null,
  null,
null,
'2003/05/01'
)

TIA



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