From libreoffice base, after connection and listing all tables, I clicked one table node, The called sequence is:
- Finished SQLTables query, j1
- SQLNumResultCols - SQL_SUCCESS
- SQLNumResultCols - SQLNumResultCols return: - 5
- StmtSQLFetch - move to next
- StmtGetSQLColAttribute - StmtGetSQLColAtribute : 4, 2, SQL_DESC_CONCISE_TYPE
- StmtGetData - StmtGetDate : 4, 1, SQL_C_CHAR
- StmtGetData - SQLGetData find data table column : - 4
- StmtGetSQLColAttribute - StmtGetSQLColAtribute : 5, 2, SQL_DESC_CONCISE_TYPE
- StmtGetData - StmtGetDate : 5, 1, SQL_C_CHAR
- StmtGetData - SQLGetData find data table column : - 5
- SQLFreeStmt - SQLFreeStmt, Option : 3, SQL_RESET_PARAMS
- SQLFreeStmt - SQLFreeStmt, Option : 2, SQL_UNBIND
- SQLFreeStmt - SQLFreeStmt, Option : 0, SQL_CLOSE
- SQLAllocHandle - Alloc handle for - 3
- CreateStmt - SonarSQLconn created stmt handle: : 0x1c92210
- SQLGetStmtAttr - SQLGetStmtAttr : 10010, SQL_ATTR_APP_ROW_DESC
- SQLGetStmtAttr - SQLGetStmtAttr : 10011, SQL_ATTR_APP_PARAM_DESC
- SQLGetStmtAttr - SQLGetStmtAttr : 10012, SQL_ATTR_IMP_ROW_DESC
- SQLGetStmtAttr - SQLGetStmtAttr : 10013, SQL_ATTR_IMP_PARAM_DESC
- StmtGetSQLColumns - SQL_SUCCESS
- StmtGetSQLColumns - Querying Columns for , j1
- StmtGetCollectionRows - Get documents for: : j1 - 3
- SQLNumResultCols - SQL_SUCCESS
- SQLNumResultCols - SQLNumResultCols return: - 3
- StmtSQLFetch - move to next
- StmtSQLFetch - move to next
- StmtSQLFetch - move to next
- StmtSQLFetch - move to next
- StmtSQLFetch - SQL_ERROR No more set.
- SQLFreeStmt - SQLFreeStmt, Option : 3, SQL_RESET_PARAMS
- SQLFreeStmt - SQLFreeStmt, Option : 2, SQL_UNBIND
- SQLFreeStmt - SQLFreeStmt, Option : 0, SQL_CLOSE
- ConnSQLGetInfo - ConnSQLGetInfo : 86, SQL_ALTER_TABLE
- ConnSQLGetInfo - ConnSQLGetInfo not supported: : 86, SQL_ALTER_TABLE
-0x1c92210 recorednum: 1 - ConnSQLGetDiagRec - ConnSQLGetDiagRec: nRecordNumber: - 1
- ConnSQLGetDiagRec - SQL_SUCCESS
-0x1c92210 recorednum: 2 - ConnSQLGetDiagRec - ConnSQLGetDiagRec: nRecordNumber: - 2
- ConnSQLGetDiagRec - nRecordNumber out of range
-0x1c92210 recorednum: 1 - ConnSQLGetDiagRec - ConnSQLGetDiagRec: nRecordNumber: - 1
- ConnSQLGetDiagRec - SQL_SUCCESS
-0x1c92210 recorednum: 2 - ConnSQLGetDiagRec - ConnSQLGetDiagRec: nRecordNumber: - 2
- ConnSQLGetDiagRec - nRecordNumber out of range
-0x1c92210 recorednum: 1 - ConnSQLGetDiagRec - ConnSQLGetDiagRec: nRecordNumber: - 1
- ConnSQLGetDiagRec - SQL_SUCCESS
This is a pretty simple table. The questin comes from:
StmtGetSQLColumns - SQL_SUCCESS
StmtGetSQLColumns - Querying Columns for , j1
StmtGetSQLColumns - pg_sonar_name_map - 3
StmtGetCollectionRows - Get documents for: : j1 - 3
SQLNumResultCols - SQL_SUCCESS
SQLNumResultCols - SQLNumResultCols return: - 3
StmtSQLFetch - move to next
StmtSQLFetch - move to next
StmtSQLFetch - move to next
StmtSQLFetch - move to next
StmtSQLFetch - SQL_ERROR No more set.
Why after querying SQLNumResultCols, and SQLFetch, it doesn’t call SQLGetData. It calls SQLFetch till there is no data there. Then free statement handle.