On Wednesday, August 10, 2011 09:44:40 am you wrote: > @John, > I tried with the class-based code as you have shown. > > seek() & setFieldVal() are working for 'statBizObj' only. > But it is not working for 'distBizObj'. > 'Not Working' means, no value is fetched from the 'distBizObj' through > seek(), although it is there in the database. > I could observe it through -- > > > >> for rownum in distBizObj.bizIterator(): > >> ... rec = distBizObj.Record > >> ... print rownum, rec.distid, rec.distnm, rec.statid > > > No result is printed. > > When tested on statBizObj the same way, result is fetched. > I don't understand what's wrong with distBizObj. > ------------------------- > > @Thomas, > I have made sure that there is a matching record in the second bizobj. > ------------------------- > > Any idea what may be wrong in this issue? > ---Vineet >
First you are better off posting to the list and not directly to me. Others may see something I missed. BTW I often mis-spell vars so check my spelling in case you just copied and pasted. When the statBizObj.requery() runs it should retrieve the child records. In this case the dist table is a child with the fk link of 'statid'. Therefore, the statBizObj.seek(someVal, someField) moves the record pointer to the correct record in statBizObj. I will assume you are using the PK as the field and value. The moving of the record pointer will cause the child (dist) record to filter based on the FK (statid). You may or may not have records that relate to 'stat' in 'dist'. This a classic one to many relation. So you need to determine 1. what the PK is in stat try -> print statBizObj.Record.statid If the PK is 0 or None you have nothing to retrieve. Either MovePK or seek(pk). 2. you can check the row count of dist -> print distBizObj.RowCount() That should tell how many records are retrieved. To my knowledge there is nothing wrong with the one to many relation setup for Dabo. It works and I use it all the time. Johnf _______________________________________________ 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]
