Home | Previous Page | Next Page   Design Decisions >

Accessing Database and System Catalog Tables

Although the VTI does not provide its own function for querying tables, you can execute an SQL statement with DataBlade API functions mi_exec(), mi_prepare(), or mi_execute_prepared_statement(). SQL provides data directly from the system catalog tables and enables the access method to create tables to hold user data on the database server.

The following example queries the system catalog table for previous statistics:

MI_CONNECTION *conn;
conn = mi_open(NULL, NULL, NULL);
/* Query system tables */
mi_exec(conn, "select tabname, nrows from systables ", MI_QUERY_NORMAL);

For more information on querying database tables, consult the IBM Informix: DataBlade API Programmer's Guide.

Warning:
A parallelizable UDR must not call mi_exec(), mi_prepare(), mi_execute_prepared_statement(), or a UDR that calls these functions. A database server exception results if a parallelizable UDR calls any UDR that prepares or executes SQL. For more information about parallelizable access-method functions, refer to Executing in Parallel.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]