This message is about how to use <dtml-calendar> to get it's data out of an
odbc database....

on 3/8/00 5:35 pm, R. David Murray at [EMAIL PROTECTED] wrote:

> On Thu, 3 Aug 2000, tom smith wrote:
>> I'm still getting allsorts of errors. My code is like this...
>> <dtml-let yearnr="date.yy()" monthnr="" daynr="date.dd()">
>> <dtml-let startDateString="monthnr+'/'+daynr+'/'+yearnr">
>> <dtml-in expr="get_days_events(startDateString)">
>> <dtml-var EventName>
>> </dtml-in>
>> </dtml-let>
>> </dtml-let>
>> I'm having trouble passing StartDateString to get_days_events. If I look at
>> StartDateString using <dtml-var startDateString> it looks OK.
> What kind of errors?

I get

Zope has encountered an error while publishing this resource.

Error Type: Bad Request
Error Value: ['startDateString']

the get_days_events() sql function looks like this...

SELECT * FROM tblCalendar
(startDate <='<dtml-var startDateString> 23:59:00'
AND endDate >= '<dtml-var startDateString> 00:00:00')
(startDate >= '<dtml-var startDateString> 00:00:00'
AND startDate <= '<dtml-var startDateString>  23:59:00')
ORDER BY startDate

with startDateString entered into the arguments field

I know the sql is a bit ugly but it's what I'm stuck with

I tried using <dtml-sqlvar but it wrapped quotes around my date which also
needs the time to work.

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to