Use <dtml-try>....</dtml-except>. If you get no result, there is no sequence to loop over with dtml-in, that's why you get an error. Still, I don't get this problem using ZODBC and Zope 2.3.3 on Windows. If there is no data, dtml-in simply has no rows to loop over, but it doesn't give an error. So the returned data object includes an empty sequence, while in your case there is no sequence. Maybe it depends on the particular database adapter you are using. Cheers, Tom P [Kerekes Lajos]
I have an SQL select. If it gives no result, I get this error message Error Type: TypeError Error Value: len() of unsized object
How can I manage it? I tried this: <dtml-in ZSQLSelect> foo, bar..... <dtml-else> no result </dtml-in>
but still get the error.