[Zope-DB] Handling no data found condition

Mike Guerrero mguerrero@tachyon.net
Thu, 17 Jan 2002 09:07:45 -0800


All,

This is probably a beginners question.

I have built a zope application that starts with a form where the user
enters a id.  When the form is submitted a Z-SQL method retrieves the row
based on the id.  The data for row is then displayed properly on a separate
dtml-method page.

My problem is that when a user enters an id and no data id found for that id
the results pages is display with no data and all of the fields out of
alignment.

How do I trap for the no data found condition and display a message and/or
re-direct the user to a different page?

Thanks.

Mike