Hi Doug
>Yes, but you'll have to do it programmatically using INDEX ON and SET >RELATION commands. The reason is because CursorAdapters are like views -- >they don't have persistent indexes, so you can't visually create >relationships for them in the Form or Class Designer.
I have related two cursoradapter with a relation object, not programmatically with set relation
try this:
1) Create a form
2) edit the DE and add 2 cursoradapters, 2 tables and create a relation between the 2 tables
3) save the form and run it from the command window with the "name" clause
4) now (from command window) invoke form.dataenvironment.saveasclass method that create a class
5) now edit the class with the class browser, you will see all the objects!
6) remove the 2 cursor object, insert the proper index on for cursoradapter change the relation's property to work with cursoradapter, save and add your class to a new form and bingo! the relation works!.
So relation works on cursoradapter, the problems are in the dataenvironment editor:
a) if you try to edit the DE from the form you got an error and the relation object is removed
b) you have to programmatically create the indexes
My hope is that the VFP depeloper team (in Italy we say: "you have made 30, made 31!") add few properties or methods to cursoradapter to create automatically indexes (with another page in the builder i.e.) and make relation object works on these "pseudo indexes" which doesn't exist in design time, but will exist in run time.
Franco
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only