>
> No. This is a lookup query, not an updatable query. I'm trying to get a
> list of recordings with artists. Artists can be People or Bands. However,
> it's not that simple; a recording is defined as a performance on a certain
> date (date left out of my examples for simplicity), a performance is
> defined as a song performed by an artist who may be either a Person or a
> Band. All of this stuff is mostly stored in the database as link tables
> containing only key values. To make sense of it for a user, complex queries
> with joins and derived fields are going to be commonplace.
>
> The only table mentioned in the FROM clause is musSongs; is that the one I
> should use? It seems arbitrary given the purpose of the query--not that
> there's anything wrong with that. But then the grid isn't going to be able
> to display my derived field, artist, is it? Since there is no field by that
> name in musSongs?
Ah lookup tables - I do that a lot!
What I do is the following:
I create a bizobj
self.metaBiz = dabo.biz.dBizobj(conn) # conn is the connection.
then setup my standard biz objects
self.metaBiz.DataSource = "schgrid" (I think this is any valid table)
self.metaBiz.KeyField = "pkid"
self.metaBiz.addField("pkid")
Etc... I think you know about this!
but you don't have to!!!!!!
set up my sql statement
I think you want to use an UserSQL you defined.
Then requery
self.metaBiz.requery()
Now a Dabo cool feature:
self.LookUpData = self.metaBiz.getDataSet()
Now you can run select statements against "self.LookUpData"
self.datarecord = self.LookUpData.execute ("select * from dataset where
etc.....")
Things to note:
1. I did not add the self.metaBiz object to the Form's bizobj and it has
nothing to do with any of the objects on the form.
2. I can make simple select statements on the dataset
I hope this helps.
--
John Fabiani
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users