Page tree
Skip to end of metadata
Go to start of metadata

PG_READ action


Function
Reading a page from specified table.
Declaration
 PG_READ handleIdent_Int, pageNrIdent_Int, locVarArrIdent, retCodeIdent_Int

Parameters
handleIdent_Int in Identifier of Int type (handle) of the connection to a table (returned by the action PG_CONNECT).
pageNrIdent_Int in Identifier of Int type of required page number (from 1 …).
locVarArrIdent out Identifier local variable of Record type (whole structure) - read result.
retCodeIdent_Int

out

Identifier of 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, that 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 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:

Write a comment...