> Thanks sir but my problem I have two tables for example name.dbf and subject.dbf I want to create a one to many relationship? It is possible to use set relation command in this scenario? any ideas or sample code? Thanks and God Bless.
Yes - you must have an key that relates the two tables, and an index onthat key then use the code I gave you:
USE name IN 0 ORDER TAG subject
USE subject IN 0
SELECT subject
SET RELATION TO subject INTO name
SET SKIP TO name
Now you have a one-to-many relation between Subject and Name!
What are you trying to do?
Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA