Was this helpful?
How to Use the Append Frame
Two approaches to adding new rows of data to a table with QBF are available:
Use a table field to append many rows of data at once.
Use simple fields to append one row at a time.
Each field on the Append frame corresponds to a single column in the query target table(s). On a default form, if the query target is a JoinDef, the join field(s) appears in reverse video, if your terminal has that capability.
Whether you use simple fields or a table field depends on the query target:
If the query target is a table, the menu choices SimpleFields and TableField appear, following the table you chose in the Tables Catalog frame.
If the query target is a Master/Detail JoinDef, the default format is a table field for the detail table and simple fields for the master. You can change this default on the JoinDef Definition frame.
If the query target is a QBFName, the form shown on the frame can have table fields or simple fields or both. The appearance and behavior of a QBFName form can be altered using the VIFRED as described in the chapters "Using VIFRED," "VIFRED Form Components," and "VIFRED Field Specifications."
How You Add New Rows of Data
To add new rows of data to the database, follow these steps:
1. Start the Append operation from the operating system or from the Ingres Menu, as described in Start the Append Operation.
2. Enter your data in the fields of the form. If you are using a table field, you can tab through the fields in each row. Press Return at the end of the row.
If the query target is a QBFName, the sequence in which the cursor moves from one field to the next is determined by the order specified in the custom form created in VIFRED.
3. When you have typed in all the rows of data that you want to add, choose the Append operation from the Append frame menu to save your additions.
Your data is added to the database tables and displays a message telling you how many rows of data it has appended.
If you do not choose the Append operation in the Append frame, your additions are not saved.
The methods you use to append data differ slightly depending on whether you are using a simple‑fields or table-field format.
SimpleFields Format
If you are appending data using simple‑fields format, you can append only one row at a time. When you are finished entering data, choose Append to write your new data into the database. Append is the only operation available.
TableFields Format
If you are appending data using table‑field format, you can enter more than one row of data in the table field before choosing Append. When finished entering data, choose Append to write your new data into the database.
The following menu operations are available on the Append frame if you choose the table‑field format:
Append
Appends the data to the table.
Insert
Inserts a new blank row in the table field.
ListChoices
Displays the available choices for the selected field on a QBFName.
Help, End
Standard operations.
The Insert operation on the Append frame allows you to open a new line in the table and insert a new row of data in a specific location. Using Insert does not affect the retrieval or reporting of data in the table(s). The Insert operation is provided as a convenience so that you can visually order your new rows as you enter them on the frame.
To use the Insert operation
Put the cursor where you want the new row to appear, and then select Insert.
QBF places the cursor at the beginning of a new blank row inserted above the previously selected row.
Data Entry Errors when Appending
When you select Append, each field is checked for errors. If an error is detected, an error message appears and the cursor returns to either the field containing the error or to the first field on the form.
Select Append again to add your corrections to the database.
If your query target is a QBFName, your customized form can contain mandatory fields, validation checks, or special attributes. These requirements must all be met before QBF allows the Append operation to add data from the form to the database.
Control-A--Duplicate Previous Entry
When entering data in simple‑field format, press Control‑A to duplicate the previously entered value for that field. For example, pressing Control‑A in the Zipcode field enters whatever zip code was entered on the previous form. Control‑A does not work in table-field columns.
Transaction Deadlock in Append Mode
Because transactions are supported, a transaction deadlock can occur in Append mode. This can only happen after you select the Append command to add the data you have entered in the form to the database. If an attempt to add a row to one of your query targets aborts because of a transaction deadlock, QBF informs you that a deadlock has occurred and that your transaction has been aborted. QBF then automatically retries the entire append.
Confirmation Messages for Append
If an append is successful, QBF displays a confirmation message, for example:
Appended 1 master and 2 detail row(s)...
QBF displays an error message if you attempt to append information to a table that has update rules preventing this, or if you violate an integrity constraint, which defines a valid range for data.
Last modified date: 01/30/2023