| DB Access Class Library for COBOL V1.0 API Reference - Microsoft(R) Windows(R) - - Microsoft(R) Windows NT(R) - - Microsoft(R) Windows(R) 2000 - |
Contents
Index
![]()
|
Chapter 6 DB Access Library API Reference
6.2 Methods
Begins adding a new row to a recordset source table.
INVOKE RECORDSET-A "ADD-NEW-RECORD" RETURNING RET-CODE.
RECORDSET-A [attribute:OBJECT REFERENCE FJDB-RECORDSET]
Specifies an object of the FJDB-RECORDSET class.
RET-CODE [attribute:S9(9) COMP-5]
Returns a value of 0 if the method ends normally; otherwise, returns an error code.
The execution of an ADD-NEW-RECORD method does not affect the location of the current row
in the recordset.
If an ADD-NEW-RECORD method is issued to a recordset that cannot be updated, an error will be returned upon issuance. (See IS-UPDATABLE method about conditions that the recordset is not updatable.)
If a MOVE-NEXT, MOVE-LAST, MOVE-PREVIOUS, or MOVE-FIRST method is issued before an UPADATE-RECORD method is issued and if a GET-BOOKMARK or SET-BOOKMARK method is issued to move the current row, the data that has been added to the field
will be destroyed.
The row that is added by using an ADD-NEW-RECORD method and an UPDATE-RECORD method is added at the position just before the current row in the local cache. The position of its insertion in the server database, however, depends on the format of data storage. Hence, the row that has been added may reappear when a MOVE-NEXT method or the like is issued.
Once an ADD-NEW-RECORD method is issued, another ADD-NEW-RECORD method, an EDIT-RECORD method, or a DELETE-RECORD method cannot be issued to the same recordset or to another recordset on the same database before an UPDATE-RECORD method is issued. The EXECUTE method cannot be issued to a database.
Contents
Index
![]()
|