` Duplicate parent records in browse (Andy Stapleton ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Duplicate parent records in browse
2002-12-05 -- Andy Stapleton
 
> I have two tables. TABLE_A and TABLE_B. The two tables are related to each > other in a one to many relationship. When I create a browse and I include > both tables in the browse and put the "One" table as my primary table and > the "Many" table as my related table, I end up getting apparently random > duplicate records appearing in my browse. your problem is standard for SQL, when you Use a Join with the parent / Child it will give you multiple parents for each child . no way around... now to solve your problem..... legacy or otherwize.....(eaiser in legacy..) change the browse to a CHILD-PARENT so it is a lookup instead look in the source and find where they do a POSITION(VIEW). substitute and hold the primary key elements for the parent record. then before the code to call the update(parent of course). do a REGET() on the position of the parent record, OR just grab the primary key items you saved of the parent and get the record again just before the call of the update/ delete..


Today is April 23, 2024, 3:12 pm
This article has been viewed 35111 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: