On Dec 14, 2008, at 3:45 PM, Roger Lovelock wrote:

> OK - I've thought about this. Please correct my logic if I am wrong!
>
>    - my new bizObj code is in biz - it is basically a clone of my  
> existing
> bizObj (but without the validation code etc) but is created  
> seperately as
> the data for the report may be selective while my main bizObj is all
> inclusive.

        There's no need to create a separate bizobj for each possible query.  
I don't quite understand what you mean by 'selective' and 'all  
inclusive'; I hope you're not doing the equivalent of 'select * from  
mytable' and bringing the entire database table across the wire.

        If you are familiar with SQL queries, you should know that our  
datasets understand SQL. IOW, you can do:

ds = bizobj.getDataSet()
justSmith = ds.execute("select * from dataset where lastname='Smith' ")

        This will result in 'justSmith' being a dataset of just those records  
in the full dataset whose lastname equals 'Smith'. See 
http://dabodev.com/wiki/DataSet 
  for more information on this.

>     - I can create the instance of this bizObj only after the  
> selection
> criteria has been entered ie in the FrmReport routine in ui. Since  
> this is a
> dDialog object self is referring to this dialog and I can do a  
> self.refresh
> to get my cursor.

        refresh() just repaints the UI. I think you want requery().

>     - The getDataset routine in db can then read  the cursor from the
> bizObj on the FrmReport dialog (maybe I should just get the dataset  
> within
> the FrmReport object and don't worry about having a seperate routine  
> in db?)

        You should never have to code to the db layer. Work in the bizobj; it  
'knows' how and when to interact with the cursor objects. So just rely  
on bizobj.getDataSet().

> Thats the design stage - hopefully I have both concepts and  
> philosophy right
> here and I can go on to the coding/implementation now.


        You're getting closer all the time.


-- Ed Leafe





_______________________________________________
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/[email protected]

Reply via email to