PG_READ action


Function
Reading a page from the specified table.
Declaration
 PG_READ handleIdent_Int, pageNrIdent_Int, locVarArrIdent, retCodeIdent_Int
Parameters
handleIdent_IntinIdentifier of the Int type (handle) of the connection to a table (returned by the action PG_CONNECT).
pageNrIdent_IntinIdentifier of the Int type of required page number (from 1 …).
locVarArrIdentoutIdentifier local variable of the Record type (whole structure) - read result.
retCodeIdent_Int

out

Identifier of the Int type - action success.
Return code
The value of the parameter transHandle_Int. See the table of error codes. It is possible to get extended error information.
Description
The action will read the specified page from a table, which is opened by the action PG_CONNECT. The number of the page is the value of the identifier pageNrIdent_Int. Pages in the table are numbered from one (1 ...). The performance of SQL expression SELECT for Oracle, stated in PG_CONNECT, can be influenced by using the Oracle SQL hint (parameter in PG_CONNECT).

If reading is successful (retCodeIden_Int = _ERR_NO_ERROR), then the reading result (required page) is assigned to the local variable locVarArrIdent_Int. In case of need, the local variable array size is changed. The structure type of the local variable must be equal with the type of the table. If the reading result is empty data (the error _ERR_NO_DATA), the local array will be resized to the size of 0.
Warning
Number of pages (number of rows) may be changed during the work with a database - the effect of the using the actions PG_INSERT, PG_DELETE.
Note
For the MySQL database, the action optimally works when paging through the next page. Data are browsed upwardly from the first page. To access to the previous page, it requires the internal pagination from the beginning.

Related pages:

Napíšte komentár