Search code examples
c#outlookoutlook-redemption

Outlook Redemption MAPITable ExecSQL


When querying a MAPITable (created from GAL with about 200000 entries) I get an Outlook Interop exception: IMAPITable::Restrict: MAPI_E_TOO_COMPLEX.

The query works if ExecSQL query is : "Select * from folder".

When i try to query with "SELECT * from Folder Where CompanyName = 'Countryname'" the exception occurs.

Any help will be appreciated.

Thanks Morten


Solution

  • Most address book providers (unlike store providers) support very limited set of restrictions. The only thing guaranteed to work is a PR_ANR restriction (which Outlook requires). For the GAL provider, you can use PR_SEARCH exposed by the RDOAddressListSearch object (new for Redemption 5.7).