gfrlaser1 said:
I found you have to use SQL a lot to really be proficient with it. I'll give that a shot for practice.
Not a bad idea. SQL is undoubtedly the more common way of acting on data and learning it will help with getting into other databases.
But relations perfectly work, you just have to know about the details, e.g., how they become 1 to many relations with SET SKIP. That's nothing new; it's still the legacy way SET RELATION between workarea always worked.
And then also only an index in the target workarea is necessary (the workarea specified after INTO), an index on the source workarea which you directly skip through with a REPLACE ALL and not just indirectly via the relation is just changing the order in which records of the parent workarea are processed, when you want to process all records, there is no advantage in indexing, it just takes extra time to index.
Dan also already mentioned the difference of temporary IDX files you create and permanent index tags, which would go into a CDX file. If you have such files, you should look for an index tag that already exists and use it, that also saves time. Permanent indexes have many more advantages, you only care about their definition once, and they are updated no matter how the DBF/FPT files are updated via VFP core runtime or ODBC driver or OLEDB Provider (which both have the parts of that VFP core runtime related to handling data)
Many topics overlap anyway, correct indexing is helpful for both legacy and SQL ways of acting on data.
As long as DBFs were used I continuously used relations and browse windows for a customer to maintain data in more than just two level hierarchies of data. You can easily connect more than two tables enable browsing data and also changing it, even in normalized databases. That only changed when going for MSSQL as database backend.
Bye, Olaf.