AdsGetNumOpenTables

Returns the number of tables currently open in the process.

Syntax

UNSIGNED32 AdsGetNumOpenTables(UNSIGNED16 *pusNumTables);

Parameters

Parameter Type Description
pusNumTables UNSIGNED16* Output — count of open tables.

Return Value

AE_SUCCESS (0) on success.

Description

AdsGetNumOpenTables iterates the handle registry and counts all registered table handles across all backends: local tables, remote tables, SQLite, PostgreSQL, MariaDB, MSSQL, ODBC, and Firebird tables.

This replaces the previous stub that always returned 0.

Example

UNSIGNED16 numTables = 0;
AdsOpenTable(&hTable1, "customers.dbf", NULL, NULL,
             ADS_ANSI, ADS_SHARED, NULL, NULL);
AdsOpenTable(&hTable2, "orders.dbf", NULL, NULL,
             ADS_ANSI, ADS_SHARED, NULL, NULL);
AdsGetNumOpenTables(&numTables);
printf("Open tables: %u\n", numTables);  // 2

See Also


← AdsGetNumActiveLinks AdsGetTableAlias →


This site uses Just the Docs, a documentation theme for Jekyll.