APPX Software Library

Chapter 7: Read APPX Data with 32-bit PowerShell

Set Query Limits and Read Error Details

The helper defaults to a 30-second SQL command timeout and at most 10,000 result rows. Select the needed columns and apply SQL filters before increasing either:

$rows = @(.\read-appx-odbc-32.ps1 -Credential $credential `
    -Sql 'SELECT * FROM DMO_DMO_COUNTRY ORDER BY name' -CommandTimeout 30 -MaxRows 100 -Verbose)

A query exceeding MaxRows fails without returning a partial result. It is a limit on collected rows, not a server-side pagination clause. -Verbose reports elapsed time and returned row count without adding status text to the success pipeline. Driver enforcement of a command timeout varies; it does not guarantee that login, metadata discovery, or every native-driver operation will stop within that period. Cancel a stalled client and investigate the driver, ports and login path before retrying.

ODBC failures include each returned SQLSTATE, native error number, and message. Retain these details and the failing query shape when requesting help. Keep passwords and private field values out of shared diagnostics. A missing DSN usually needs the bitness and DSN check; a reachable TCP socket alone does not establish a successful APPX login or query.

When finished, clear the working variables or close the PowerShell window:

Remove-Variable credential, rows, again, selected, tables, columns -ErrorAction SilentlyContinue

Closing the connection does not refresh a previously exported CSV, JSON document, or local Access copy. Run another query to create a new snapshot.