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; it was not part of this edition's accepted checks. The focused -Describe example above passed and returned the nine COUNTRY columns. The 5.5.1 metadata checks found inconsistent unrestricted discovery with this supplied driver generation, including -20217 / SQLSTATE 00000. Keep that separate result with its tested release and use focused discovery here. Some legacy driver combinations treat missing, null and empty restriction arguments differently. On a large dictionary, unrestricted column discovery can be expensive; use it for diagnosis and retain the result rather than running it for every business query. -CommandTimeout applies to SQL commands, not GetSchema or connection opening.