APPX Software Library

Chapter 7: Read APPX Data with 32-bit PowerShell

List Tables and Columns and Identify the Driver

These calls use the same credential and return objects that can be inspected or exported:

.\read-appx-odbc-32.ps1 -Credential $credential -ConnectionInfo | Format-List
$tables = @(.\read-appx-odbc-32.ps1 -Credential $credential -Tables)
$tables | Where-Object { $_.TABLE_NAME -match 'COUNTRY' } |
    Select-Object TABLE_SCHEM, TABLE_NAME, TABLE_TYPE
$columns = @(.\read-appx-odbc-32.ps1 -Credential $credential -Describe `
    -Sql 'SELECT * FROM DMO_DMO_COUNTRY WHERE 1 = 0')
$columns | Format-Table ColumnName, Ordinal, DataType, Size, AllowDBNull -AutoSize

The connection information shows the loaded DLL path and file version, along with the server version and process bitness; compare it with the tested version table. The metadata calls discover definitions already in the selected SQL dictionary. They do not import a new APPX file. A table and its synonym may both be listed; duplicate discovery entries do not mean duplicate APPX business records.

The table-discovery call retrieves unrestricted metadata before filtering in PowerShell. Column description uses the selected SQL result with WHERE 1 = 0, which describes the nine COUNTRY fields without returning business records. -Describe still executes the supplied SQL, so retain the false predicate and use a SELECT statement.

The optional -Columns switch requests unrestricted ODBC column metadata. The focused -Describe query above is the verified column-description route for this edition. Unrestricted column discovery has not been accepted here; on a large dictionary it can also be expensive. Some legacy driver combinations treat missing, null and empty restriction arguments differently. -CommandTimeout applies to SQL commands, not GetSchema or connection opening.