|
CREATE — Creates an empty record buffer
|
|
DISPLAY — Moves the record from the record buffer into the screen buffer and displays the contents of the buffer on the screen
|
|
PROMPT-FOR — Accepts input from the user, and puts that input into the screen buffer
|
|
ASSIGN — Moves data from the screen buffer into the record buffer
|
1.
|
CREATE — Creates an empty record buffer
|
2.
|
DISPLAY — Moves the contents of the record buffer to the screen buffer and displays the screen buffer
|
3.
|
PROMPT-FOR — Accepts input from the user into the screen buffer
|
4.
|
ASSIGN — Moves the contents of the screen buffer to the record buffer
|
INSERT record [ EXCEPT field ... ]
[ USING { ROWID ( nrow ) | RECID ( nrec ) } ]
[ frame-phrase ]
[ NO-ERROR ]
|
The name of the record you want to add to a database file. The AVM creates one record buffer for every file you use in a procedure. This buffer is used to hold a single record from the file associated with the buffer. Use the DEFINE BUFFER statement to create additional buffers, if necessary. The CREATE part of the INSERT statement creates an empty record buffer for the file in which you are inserting a record.
USING { ROWID (
nrow )
| RECID (
nrec )
}
Suppresses ABL errors or error messages that would otherwise occur and diverts them to the
ERROR-STATUS system handle. If an error occurs, the action of the statement is not done and execution continues with the next statement. If the statement fails, any persistent side-effects of the statement are backed out. If the statement includes an expression that contains other executable elements, like methods, the work performed by these elements may or may not be done, depending on the order the AVM resolves the expression elements and the occurrence of the error.
|
Check if the ERROR-STATUS:NUM-MESSAGES attribute is greater than zero to see if the AVM generated error messages. ABL handle methods used in a block without a CATCH end block treat errors as warnings and do not raise ERROR, do not set the ERROR-STATUS:ERROR attribute, but do add messages to the ERROR-STATUS system handle. Therefore, this test is the better test for code using handle methods without CATCH end blocks. ABL handle methods used in a block with a CATCH end block raise ERROR and add messages to the error object generated by the AVM. In this case, the AVM does not update the ERROR-STATUS system handle.
|
|
A CATCH statement, which introduces a CATCH end block, is analogous to a NO-ERROR option in that it also suppresses errors, but it does so for an entire block of code. It is different in that the error messages are contained in a class-based error object (generated by the AVM or explicitly thrown), as opposed to the ERROR-STATUS system handle. Also, if errors raised in the block are not handled by a compatible CATCH block, ON ERROR phrase, or UNDO statement, then the error is not suppressed, but handled with the default error processing for that block type.
|
|
When a statement contains the NO-ERROR option and resides in a block with a CATCH end block, the NO-ERROR option takes precedence over the CATCH block. That is, an error raised on the statement with the NO-ERROR option will not be handled by a compatible CATCH end block. The error is redirected to the ERROR-STATUS system handle as normal.
|
|
If an error object is thrown to a statement that includes the NO-ERROR option, then the information and messages in the error object will be used to set the ERROR-STATUS system handle. This interoperability feature is important for those integrating code that uses the traditional NO-ERROR technique with the newer, structured error handling that features error objects and CATCH end blocks.
|
In this procedure the user adds a new Order record. After the user adds a new Order record, the procedure creates OrderLines for that record. The procedure uses the CREATE statement to create OrderLines rather than the INSERT statement. When you use the INSERT statement, the PROMPT-FOR and ASSIGN parts of the INSERT let you put data into all the fields of the record being inserted. In the case of OrderLines, this procedure only lets you add information into a few of the OrderLine fields. Use CREATE together with UPDATE to single out the OrderLine fields.
|
In the context of the .NET blocking method, System.Windows.Forms.Application:Run( ), if you directly or indirectly execute the INSERT statement while displaying a non-modal ABL window, in certain contexts (such as within a user-defined function or non- VOID method) this statement execution raises the STOP condition. For more information on the .NET Application:Run( ), method, see the reference entry for the WAIT-FOR statement (.NET and ABL).
|