DOCUMENT:Q133357 15-FEB-2000 [foxpro] TITLE :Differences Between Temporary and Permanent Relationships PRODUCT :Microsoft FoxPro PROD/VER:WINDOWS:3.0 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 3.0 ------------------------------------------------------------------------------- SUMMARY ======= Relationships between tables can be established to link the tables together based on matching values in a field common to all the tables. The relationships can be created to exist from one FoxPro session to another (permanent or persistent) or temporarily for each time a table is used. Each type relationship is created differently and exists or behaves, in Visual FoxPro, differently. Generally, both types of relationships are used regularly in Visual FoxPro programming. MORE INFORMATION ================ Permanent or Persistent Relationships ------------------------------------- Permanent or persistent relationships can only exist between tables stored in a database container (as opposed to free tables). The relationship itself is stored within the database container and therefore can exist from one Visual FoxPro session to another until the relationship is explicitly terminated. Persistent relationship can be created in the Database Designer using the table indexes (as opposed to using the table fields). Because persistent relationships are stored in the database container certain functions can use these relationships as default links. Each time the tables involved in the persistent relationship are used in the Query, View, or Data Environment Designers, these persistent relationships are used as the default links. Persistent relationships are used to store referential-integrity information. Temporary Relationships ----------------------- Temporary relationships can exist between free tables or tables stored in a database container. However, temporary relationships cannot be created between a free table and a table in database container. To create temporary relationships, use the SET RELATION TO command or create them visually in the View window. They must be recreated each time the table is used. Another major difference between a Persistent and Temporary relationship is that the Temporary relationship causes the record pointer in the child table to move automatically when the parent record pointer moves. REFERENCES ========== Additional information regarding the definition, creation and removal of Persistent and Temporary relationships can be found in the Visual FoxPro Help menu and in the Visual FoxPro User's and Developer's Guides: Visual FoxPro User's Guide, Page 67; Developer's Guide, Pages 131, 183. Additional query words: VFoxWin ====================================================================== Keywords : Technology : kbVFPsearch kbAudDeveloper kbVFP300 Version : WINDOWS:3.0 ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2000.