Get Previous Extended (37)
The Get Previous Extended operation (B_GET_PREV_EXTENDED) examines one or more records, starting at the logical previous position and proceeding toward the beginning of the file, based on the specified key. It checks to see if the examined record or records satisfy a filtering condition, and it retrieves the ones that do. The filtering condition is a logic expression and is not limited to key fields only.
Get Previous Extended can also extract specified portions of records and return only those portions to an application.
Parameters
 
Prerequisites
Procedure
1
For more information about locking, refer to the Pervasive PSQL Programmer's Guide.
2
3
4
Specify the Data Buffer Length as either the length of the input structure (Table 21) or the length of the returned structure (Table 22), whichever is larger.
The transactional interface sets up a buffer as a workspace for extended operations. You configure the size of this buffer using the Extended Operation Buffer Size option. The sum of the Data Buffer structure, plus the longest record to be retrieved, plus 355 bytes of requester overhead, cannot exceed the configured buffer size. (Requester overhead is not applicable in DOS workstation engines.)
5
6
Details
This operation uses the same input and returned Data Buffers as the Get Next Extended operation. Refer to Details for more information.
Result
This operation returns the same results as the Get Next Extended operation. Refer to Result for more information.
Positioning
The Get Previous Extended operation establishes the complete logical and physical currencies. The last record examined becomes the current record. This record can be either a record that satisfies the filtering condition and is retrieved, or a record that does not satisfy the filtering condition and is rejected.
*Note: The transactional interface does not allow Delete or Update operations after a Get Previous Extended operation. Because the current record is the last record examined, there is no way to ensure that your application would delete or update the intended record.