In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

oDataSet:SetRelation()

Xailer professional forum in English
g.s.rogers
Mensajes: 202
Registrado: Dom Feb 17, 2008 3:35 am

oDataSet:SetRelation()

Mensaje por g.s.rogers »

I am trying to display two DBBrowse objects in a form with a parent/child
relationship between them.
oDbfDataSetFeeGroups is the Parent.
oDbfDataSetGroupAllocations is the Child
The foreign key in the Child is field ALLOCID and the Child dbf is indexed
on that field. It is the only index for the child table.
Here is what I put in the oForm:Initialize() event:
::oDbfDataSetFeeGroups:Select()
::oDBfDataSetFeeGroups:SetRelation("Allocid" ,
::oDbfDataSetGroupAllocations)
::oDbfDataSetFeeGroups:GoTop() // probably not needed
::oDBBrowseFeeGroups:GoTop()
::oDBBrowseFeeGroups:SetFocus()
The Parent DBBrowse shows records, the Child DBBrowse object does not. I
have verified that I have sample data in the child dbf that matches parent
records.
Why doesn't this work?
TIA,
Gary
Responder