Home | Previous Page | Next Page   Purpose-Function Reference > Purpose-Function Syntax >

am_getbyid

The database server calls am_getbyid instead of am_getnext to pass the row identifier instead of a scan descriptor. For example, the database server might obtain the row identifier from an index on the virtual table.

Syntax

mi_integer am_getbyid(MI_AM_TABLE_DESC *tableDesc,
   MI_ROW **retrow, mi_integer rowID) 
tableDesc
points to the table descriptor.
retrow
points to the location where the function should place a row structure that contains the fetched data.
rowID
is the row identifier or physical address of the row to fetch.

Usage

The am_getbyid purpose function does not scan a table to find a qualifying row.

Possible row identifiers that rowID might point to include:

As with am_getnext, am_getbyid first fetches the specified row and then passes the retrow pointer to mi_row_create() to build the composite MI_ROW value from fetched data.

Important:
The database server does not call am_getbyid unless you set the am_rowids purpose flag. For more information about setting purpose flags, refer to SQL Statements for Access Methods.

Return Values

MI_OK indicates success. MI_ERROR indicates failure.

Related Topics

See the descriptions of:

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]