Description:  This is a description of how to simulate a one to
many relationship in ObjectVision.  MASTER buttons control
scrolling records in a Master database.  DETAIL buttons control
scrolling records in a detail database.  The two tables remain in
sync unless one of the Master records is deleted, creating
"orphans".  This form is not designed to append records, or edit
keyed fields.  Some simple modification can make this possible.

I must point out that this application is only a simulation of 
a one to many relationship.  IT WILL NOT GUARANTEE REFERENTIAL 
INTEGRITY.

How it works:  Create five data fields in an ObjectVision form:
Last name, Master first, Master address, Detail order no, and
Detail description.

  There should be a total of six database fields in two separate
tables: MASTER.DB and DETAIL.DB.  These tables must be created in
Paradox, in order to create the correct keyed fields.  The
structure of the fields in MASTER.DB and DETAIL.DB should be as
follows:
MASTER.DB
		LAST		A20*
		FIRST		A20
		ADDRESS		A20

DETAIL.DB
		LAST			A20*
		ORDER NO.		N*
		ORDER DESC.		A20
(Asterisk means the field is keyed, just like in Paradox.)

  Create two links, Master link and Detail link.  One will use
the Master table and the other will use the Detail table.  Use
Tools|Links to create the Paradox table links.  The links should
be setup as follows:

Object Vision field		Master table/		Detail table/
				Master link		Detail link
---------------------------------------------------------------------
Last name			Last			Last
Master first			First
Master last			Last
Detail order no.					Order no.
Detail description					Order Desc.


  Create seven buttons for each link, making a total of fourteen
buttons.  The function of each button will be identical for each
link.  The functions are @STORE, @TOP, @BOTTOM, @NEXT,
@PREVIOUS, @CLEAR, and @DELETE.  Simply create a button of
each function for both links (eg. @STORE("Master link") and
@STORE("Detail link")).

  Pressing the buttons associated with the Master link scroll
through the Master table, showing the different names of people
in the tables.  Pressing the buttons associated with the Detail
link scroll through the order details of the tables.  The fields
will not come out of sync, unless orphans are created, as
described above.


M. Starrett
