As a reminder, here's the query I'm running, via UserSQL: SELECT musSongs.song, (SELECT CASE musPerfs.arttype WHEN "P" THEN musPeople.lastname WHEN "B" THEN musBands.bandname ELSE " " END FROM musPerfs JOIN musPeople ON musPeople.pkid == musPerfs.artid JOIN musBands ON musBands.pkid == musPerfs.artid WHERE musPerfs.songid == musSongs.pkid) AS artist, musRecs.pkid FROM musSongs JOIN musPerfs ON musPerfs.songid == musSongs.pkid JOIN musRecs ON musRecs.perfid == musPerfs.pkid
> > I guess the notion of the bizobj's KeyField is incompatible with > > UserSQL in some way, and so there's something else on the bizobj that I > need > > to set, but I don't know what it is. > > No, but you do need to include that KeyField in the UserSQL > statement. The KeyField *is* in the query. > > biz = dabo.biz.dBizobj(conn) > > > > # No DataSource; we'll use DataSet instead. > > I've never tried running a bizobj without a DataSource. What > happens >if you set this to the name of the table? There are four tables involved in the query; which one would I use? > > # I've tried commenting this out entirely, or using "pkid" > > or "musRecs.pkid" here. > > # In all cases the error has to do with KeyField. It also > > doesn't matter > > # whether or not musRecs.pkid is in SELECT clause of the > > query. And, it doesn't > > # matter whether there's a LIMIT clause in the query. I > > put it in because I thought > > # it just might be taking the data engine a really long > > time to deal with these > > # joins. But I can let it sit for 15 minutes and it > > produces nothing. > > biz.KeyField = "musRecs.pkid" > This should always be just a column name, not a table.column name. All of my tables have a pkid field; how does Dabo know which one I'm talking about? In any case, I tried it that way; same error. Ken -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.6/708 - Release Date: 3/2/2007 4:19 PM _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
