On Friday 22 June 2007 10:15, Ed Leafe wrote:
> On Jun 22, 2007, at 1:11 PM, <[EMAIL PROTECTED]>
>
> <[EMAIL PROTECTED]> wrote:
> > How do we clear the dataset without triggering the "no records in
> > dataset"
> > notification upon requery?
> >
> > We are intentionally setting the sql where clause to "0=1" when the
> > user
> > presses a "Clear" button and would like to clear the screen without
> > the
> > message.   We thought about manually setting the dataset to {}, but
> > then the
> > child records may not clear.  Bottom line...how do we emulate a
> > "clearDataset" method?
>
>       You can't avoid triggering the exception, but you can handle it.
>
> try:
>       <do your clearing stuff>
> except dabo.dException.NoRecordsException:
>       pass
>
> -- Ed Leafe
> -- http://leafe.com
> -- http://dabodev.com

To be a bit clearer:

OnClear(self):
bizobj.setWhereClause('0=1')
try:
   self.Form.requery()
except dabo.dException.NoRecordsException:
        pass

does not work because Dabo is handling the exception in the "requery()".

-- 
John Fabiani


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to