Thanks Ed - that really clears things up for me - any selection criteria 
being applied to the already existing data set really simplifies things 
(hadn't realised you could apply sql to the dabo dataset).
nb in this instance (and because it is a local - SQLite - database and will 
only ever have a small number of records) I was dealing with the entire 
table, but I agree - normally a No-No!
 Agree bizObj is the obvious place for the code - just that the AppWizard 
has the getSampleDataSet routine in db and I was following that.
refresh - yes I meant requery!

Thanks - thats putting me on the right track!
                        Rodgy
----- Original Message ----- 
From: "Ed Leafe" <[email protected]>
To: "Dabo Users list" <[email protected]>
Sent: Monday, December 15, 2008 9:14 AM
Subject: Re: [dabo-users] Fw: Fw: Running a Report


> 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
>
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
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/6b9a9cb1b8e34ff09a17ff38e5743...@roger

Reply via email to