On Friday 22 June 2007 12:44, Paul McNett wrote: > johnf wrote: > > I am displaying a table on a grid that contains several FK keys and I > > want the description (in the FK table) to display in the grid. > > > > In VFP I would just set the relationships in the data evironment. But I > > don't see how I can do this in Dabo? > > > > So in my table I have: > > fk_A = the pkid in FK_tableA > > fk_B=the pkid in FK_tableB > > > > FK_tableA: > > pkid > > description > > > > FK_tableB: > > pkid > > description > > > > Any suggestions would be helpful. > > Modify your SQL statement to pull the descriptions into the result set. > IOW: > > select main.pkid as pkid, > main.fk_a as fk_a, > main.fk_b as fk_b, > table_a.description as a_description, > table_b.description as b_description > from main > left join table_a > on table_a.pkid = main.fk_a > left join table_b > on table_b.pkid = main.fk_b
Actually, I thought of changing the SQL statement and using the DynamicDataSource to change the information as I move from parent to parent. But how do I make changes to the under lying grid data and have it refresh or update the grid? Maybe a update wold work. Also adding a record (to the grid) would be a problem???? Since the new record has no data and is not saved. I'm not sure of anything I just said. But it sounds very tricky to deal with. -- 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]
