Knowledge Base

PRB: PR_EMAIL_ADDRESS Missing When Querying Offline AddressBook

Article ID: 197789

Article Last Modified on 3/4/2004


APPLIES TO


This article was previously published under Q197789

SYMPTOMS

When querying an offline addressbook that does not contain details, there are circumstances when some of the properties that normally return will not appear. For example, when selecting a mailbox using the "To:" button, the PR_EMAIL_ADDRESS is missing.

RESOLUTION

Instead of querying for a specific property, return the entire property array. You can do this by setting the SPropTagArray parameter to NULL when calling the HrQueryAllRows() function.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior



Use the following code to see the behavior:
   static SizedSPropTagArray( 1, sptCol) = { 1, PR_EMAIL_ADDRESS };

   // Query the recipient table for the email_address property

   if ( FAILED( hRes = HrQueryAllRows( lpTable,
              (LPSPropTagArray)&sptCol,NULL, NULL, 0, &pRow ) ) )
      goto Quit;

   if ( pRow && PR_EMAIL_ADDRESS == pRow->aRow[0].lpProps[0].ulPropTag )
      MessageBox(NULL,"PR_EMAIL_ADDRESS returned",NULL,MB_OK);
   else
      MessageBox(NULL,"PR_EMAIL_ADDRESS unavailable",NULL,MB_OK);
				

Keywords: kbmsg kbprb kbcode KB197789