home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
database
/
p4w_all.zip
/
TI1436.ASC
< prev
next >
Wrap
Text File
|
1993-04-14
|
6KB
|
199 lines
PRODUCT : Paradox for Windows NUMBER : 1436
VERSION : 1.0
OS : WIN
DATE : April 14, 1993 PAGE : 1/3
TITLE : Editing Selected Records on a Multi-Table Database
Intended Audience
Interactive Users
Prerequisites
Existing multi-table form. Familiarity with queries.
Purpose
This document details the steps to query selected records of a
multi-table database by more than one parameter, edit the
records, and then update the Master table in the multi-table
form.
It is sometimes desirable to edit selected records of tables in a
multi-table form. This can be accomplished through a series of
steps that include 1) querying selected records from the Master
table, 2) using the multi-table form to edit the selected records
from the resulting Answer table and/or records from the linked
Detail table(s), and 3) updating the Master table from the Answer
table.
STEPS:
1. If your Master table is not keyed, you must key your
Master table. To verify if the Master table is keyed,
choose File | Utilities | Info Structure, select the
Master table and choose the OK button (when you are
finished viewing the structure information for the Master
table, choose Done). If your Master table does not have a
key, choose File | Utilities | Restructure and key the
table.
NOTE: When you key an un-keyed table, key violations can
occur and all duplicate key records will be transferred to
a temporary table called KeyViol. If this occurs, it is
important to add additional keys to your fields until you
can re-insert the KeyViol records. For more information
on keys and restructuring tables, see Chapter 9 of your
Paradox for Windows User's Guide.
2. From the menu, choose File | New | Query, select the
Master table from the Select File dialog box, then choose
the OK button. In the query window, click the check box
PRODUCT : Paradox for Windows NUMBER : 1436
VERSION : 1.0
OS : WIN
DATE : April 14, 1993 PAGE : 2/3
TITLE : Editing Selected Records on a Multi-Table Database
that is below the table name to check all fields in the
query window. Enter the search parameters for your query
statement (e.g. to filter all last names beginning with
the letter "A" and all first names that begin with the
letter "B", type "A.." in the Last Name field and type
"B.." in the First Name field). Press [F8] to run the
query.
3. From the menu, choose File | Open | Form, then select the
multi-table form that you use for your database, choose
the Change Table button, select the Answer table, choose
the OK button, and then choose the next OK button.
The multi-table form is displayed on your screen. It
shows the Answer table (that was created in step 2 as the
Master table and the records from the Detail table(s) that
are linked to the Answer table records. Click the Edit
Table icon from the SpeedBar (or press [F9]) and make all
desired editing changes to either the Answer table or to
the linked records of the Detail table(s).
NOTE: When you make a change to a record in a Detail
table, that change is immediately reflected as soon as you
move off the record.
4. When all changes have been made, click the Edit Table icon
from the SpeedBar (or press [F9]) to leave Edit mode.
5. To update the Master table from the Answer table, choose
File | Utilities | Add from the menu. The Add dialog box
will display. Position the insertion point in the From
text box, then choose :PRIV:ANSWER.DB from the list of
tables or type :PRIV:ANSWER.DB. Do not type ANSWER or
ANSWER.DB.
Position the insertion point in the To text box, then
choose or type the name of the Master table. Choose the
Update option, then choose the OK button.
6. When the update is complete, Paradox will display a
temporary table called Changed. The Changed table
contains the updated Master table records in a state that
they were in before the update. Paradox provides this
PRODUCT : Paradox for Windows NUMBER : 1436
VERSION : 1.0
OS : WIN
DATE : April 14, 1993 PAGE : 3/3
TITLE : Editing Selected Records on a Multi-Table Database
table as a backup. The Detail records were updated at the
time that you made changes in the form.
7. From the menu choose File | Open | Form, select the
multi-table form that you use, then choose the Change
Table button, highlight and select the Master table. Now
choose the OK button, and choose the next OK button. Your
changes will be reflected in the Master and Detail tables.
Suggested Reading:
User's Guide, Chapter 6, "Querying your data"
User's Guide, Chapter 9, "Creating and restructuring tables"
User's Guide, Chapter 8, "Using object utilities"
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.