Progress
Language Tutorial
for Character
Summary
Primarily, you work with three data locations:
Progress creates and maintains buffers for you, but you programmatically control the movement of data between buffers. Some rules about data and buffers:
To make an unambiguous reference to a database field, specify the database name, table name, and field name using this syntax:
database.table.field
The following list summarizes the data handling statements:
- FIND — Copies data from the database to the record buffer.
- GET — Copies data from the database to the record buffer. You use GET with a defined query. Progress has three statements that control defined queries:
- DISPLAY — Moves data from the record buffer to the screen buffer.
- ENABLE — Allows user input into the screen buffer.
- ASSIGN — Moves data from the screen buffer to the record buffer.
- UPDATE — Combines the functions of SET and DISPLAY.
- RELEASE — Prematurely releases a record from the record buffer to the RDBMS.
- CREATE — Adds a new record to the database and copies the empty record to the record buffer.
- DELETE — Marks a record for deletion and releases the record to the RDBMS for eventual removal from the database.
- PROMPT-FOR — Allows user input from the user to the screen buffer.
- SET — Combines the functions of PROMPT-FOR and ASSIGN.
- INSERT — Combines the functions of CREATE and UPDATE.
When working with records, your procedures should handle the basic error processing associated with not finding a record. Using the NO-ERROR option suppresses the Progress default error response. Use the AVAILABLE function to test the record buffer before attempting to use the buffer.
The PROMPT-FOR, SET, UPDATE, and INSERT statements all have implied blocking properties. These statements block execution until the user issues either a GO event or an ENDKEY event. Because of this behavior, these statements must never be mixed with WAIT-FOR statements.
To facilitate the GO and ENDKEY events more easily, you can associate buttons with the events using the AUTO-GO and AUTO-ENDKEY options in a DEFINE BUTTON statement.
The length of time a record stays in the record buffer is called the scope of the record. As a very general rule of thumb, a record’s scope ends when a new record is requested or the block in which the buffer was created ends.
Alert boxes are extensions to the window widget that provide important information to users and disable the rest of the interface until the user responds to the alert box.
A browse widget is a specialized selection list for displaying data from database tables:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |