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.