I am currently using FILTER to query subsets of tables. But it is too slow. And after two years of no problems with the FILTERs in the program, suddenly I have one which no longer works properly for some unknown reason. After two hours I finally isolated the source of the problem. Next I have to find out why and fix it.
But since using FILTER is so slow, I am seriously thinking of using a CURSOR instead of FILTER rather than fixing the above problem. (I have an older version of the program that can be used in the meantime.)
What I need to know is what is the best way to create a CURSOR on the fly using the parent table as the ONLY input. What I need is to write a function with the following characteristics:
1) Needs to work with FP 2.6
2) Creates a cursor containing:
2a) all fields in parent, child, grandchild, g-grandchild, etc tables in the database tree
2b) an additional two fields for every table in the tree, one for the table name and one for the record number
3) Has as its only input parameter the name of the parent table
4) Can find all child tables of any depth
5) Can cope with both one-to-one and one-to-many relationships
6) Can cope with fields of any data type
7) Populates the cursor with all possible record combinations based on relationships and skips
8) Populates the cursor with the table names and record numbers corresponding to the underlying records in the database tree
Misused, a cursor like this can easily cause problems with available memory. However, for what I need it for, the upper limit currently is about 200 records in a cursor with about 50 fields, with a realistic maximum limit of 1000 records within the foreseeable future.
I did a small scale search looking for some way to approach this, but didn't find anything that helped.
Does anyone know where I can find any information that would help solve this problem?
mmerlinn
"Political correctness is the BADGE of a COWARD!"
But since using FILTER is so slow, I am seriously thinking of using a CURSOR instead of FILTER rather than fixing the above problem. (I have an older version of the program that can be used in the meantime.)
What I need to know is what is the best way to create a CURSOR on the fly using the parent table as the ONLY input. What I need is to write a function with the following characteristics:
1) Needs to work with FP 2.6
2) Creates a cursor containing:
2a) all fields in parent, child, grandchild, g-grandchild, etc tables in the database tree
2b) an additional two fields for every table in the tree, one for the table name and one for the record number
3) Has as its only input parameter the name of the parent table
4) Can find all child tables of any depth
5) Can cope with both one-to-one and one-to-many relationships
6) Can cope with fields of any data type
7) Populates the cursor with all possible record combinations based on relationships and skips
8) Populates the cursor with the table names and record numbers corresponding to the underlying records in the database tree
Misused, a cursor like this can easily cause problems with available memory. However, for what I need it for, the upper limit currently is about 200 records in a cursor with about 50 fields, with a realistic maximum limit of 1000 records within the foreseeable future.
I did a small scale search looking for some way to approach this, but didn't find anything that helped.
Does anyone know where I can find any information that would help solve this problem?
mmerlinn
"Political correctness is the BADGE of a COWARD!"