Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: IMAPITable::QueryRows sometimes fails to retrieve values of custom properties

Geek News

IMAPITable::QueryRows sometimes fails to retrieve values of custom properties
"Jan Reher" <undisclosed> 8/10/2006 12:19:01 PM
Greetings,

Context: Using MAPI, I want to look at certain properties of all messages in
an inbox. Instead of opening an IMessage interface on all of the messages,
which will fetch all properties including a possibly large body and a number
of possibly large attachments, I fetch the contents table for the folder,
and then use IMAPITable::SetColumns to indicate just the properties I need.
Finally I call IMAPITable::QueryRows to retrieve the actual values of the
properties.

Problem: Sometimes, only sometimes, the IMAPITable::QueryRows call returns
SRow data where the value of some of the properties is MAPI_NOT_FOUND for
messages that I know have these properties. These properties are custom
properties. I have never seen the problem occur for standard Outlook
properties.

Ideas and suggestions are much appreciated.



Best regards,

Jan Reher


Re: IMAPITable::QueryRows sometimes fails to retrieve values of custom properties
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 8/10/2006 5:18:17 PM
Are you *sure* you look at the right messages? Do you see the correct
properties in OutlookSpy - click IMAPIFolder, go to the GetContentsTable
tab, add the property in question (SetColumns button) if the property is
not yet listed.
MAPI_NOT_FOUND is sometimes returned if you request multiple version of the
same property - e.g. if you request PR_HTML when PR_BODY and/or
PR_RTF_COMPRESSED is also requested.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Jan Reher" <undisclosed> wrote in message
news:ulW9XcHvGHA.4756[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> Greetings,
>
> Context: Using MAPI, I want to look at certain properties of all messages
> in an inbox. Instead of opening an IMessage interface on all of the
> messages, which will fetch all properties including a possibly large body
> and a number of possibly large attachments, I fetch the contents table for
> the folder, and then use IMAPITable::SetColumns to indicate just the
> properties I need. Finally I call IMAPITable::QueryRows to retrieve the
> actual values of the properties.
>
> Problem: Sometimes, only sometimes, the IMAPITable::QueryRows call returns
> SRow data where the value of some of the properties is MAPI_NOT_FOUND for
> messages that I know have these properties. These properties are custom
> properties. I have never seen the problem occur for standard Outlook
> properties.
>
> Ideas and suggestions are much appreciated.
>
>
>
> Best regards,
>
> Jan Reher
>
>


Re: IMAPITable::QueryRows sometimes fails to retrieve values of custom properties
"Jan Reher" <undisclosed> 8/11/2006 1:53:56 PM
Hi Dmitry,

Thank you for the speedy answer. I will investigate, and post back as soon
as I have something to say.


Regards,
Jan Reher

PS: Your presence in the vicinity of Outlook and MAPI is of immense value to
people like me who make extension programs to Outlook for a living.

-----------------------------------------------------

"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
news:uBuSLCKvGHA.4624[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> Are you *sure* you look at the right messages? Do you see the correct
> properties in OutlookSpy - click IMAPIFolder, go to the GetContentsTable
> tab, add the property in question (SetColumns button) if the property is
> not yet listed.
> MAPI_NOT_FOUND is sometimes returned if you request multiple version of
> the same property - e.g. if you request PR_HTML when PR_BODY and/or
> PR_RTF_COMPRESSED is also requested.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Jan Reher" <undisclosed> wrote in message
> news:ulW9XcHvGHA.4756[ at ]TK2MSFTNGP02.phx.gbl...
>> Greetings,
>>
>> Context: Using MAPI, I want to look at certain properties of all messages
>> in an inbox. Instead of opening an IMessage interface on all of the
>> messages, which will fetch all properties including a possibly large body
>> and a number of possibly large attachments, I fetch the contents table
>> for the folder, and then use IMAPITable::SetColumns to indicate just the
>> properties I need. Finally I call IMAPITable::QueryRows to retrieve the
>> actual values of the properties.
>>
>> Problem: Sometimes, only sometimes, the IMAPITable::QueryRows call
>> returns SRow data where the value of some of the properties is
>> MAPI_NOT_FOUND for messages that I know have these properties. These
>> properties are custom properties. I have never seen the problem occur for
>> standard Outlook properties.
>>
>> Ideas and suggestions are much appreciated.
>>
>>
>>
>> Best regards,
>>
>> Jan Reher
>>
>>
>
>


Re: IMAPITable::QueryRows sometimes fails to retrieve values of custom properties
"Jan Reher" <undisclosed> 8/14/2006 1:05:01 PM
Answers to Dmitry's questions:
[Quoted Text]
>> Are you *sure* you look at the right messages? Do you see the correct
>> properties in OutlookSpy - click IMAPIFolder, go to the GetContentsTable
>> tab, add the property in question (SetColumns button) if the property is
>> not yet listed.
Yes, we are definitely looking at the right message, and we see the expected
properties and values in OutlookSpy.

>> MAPI_NOT_FOUND is sometimes returned if you request multiple version of
>> the same property - e.g. if you request PR_HTML when PR_BODY and/or
>> PR_RTF_COMPRESSED is also requested.
We do not request such properties.

So, once again, thanky you. We have decided to open the complete IMessage
interface instead of using IMAPITable::QueryRows, since the perceived
performance loss is not significant. So unless someone happens to have a
bright idea readily available, I think we should terminate this thread.



Regards,
Jan Reher

"Jan Reher" <undisclosed> wrote in message
news:eT22F2UvGHA.4876[ at ]TK2MSFTNGP04.phx.gbl...
> Hi Dmitry,
>
> Thank you for the speedy answer. I will investigate, and post back as soon
> as I have something to say.
>
>
> Regards,
> Jan Reher
>
> PS: Your presence in the vicinity of Outlook and MAPI is of immense value
> to people like me who make extension programs to Outlook for a living.
>
> -----------------------------------------------------
>
> "Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
> news:uBuSLCKvGHA.4624[ at ]TK2MSFTNGP02.phx.gbl...
>> Are you *sure* you look at the right messages? Do you see the correct
>> properties in OutlookSpy - click IMAPIFolder, go to the GetContentsTable
>> tab, add the property in question (SetColumns button) if the property is
>> not yet listed.
>> MAPI_NOT_FOUND is sometimes returned if you request multiple version of
>> the same property - e.g. if you request PR_HTML when PR_BODY and/or
>> PR_RTF_COMPRESSED is also requested.
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Jan Reher" <undisclosed> wrote in message
>> news:ulW9XcHvGHA.4756[ at ]TK2MSFTNGP02.phx.gbl...
>>> Greetings,
>>>
>>> Context: Using MAPI, I want to look at certain properties of all
>>> messages in an inbox. Instead of opening an IMessage interface on all of
>>> the messages, which will fetch all properties including a possibly large
>>> body and a number of possibly large attachments, I fetch the contents
>>> table for the folder, and then use IMAPITable::SetColumns to indicate
>>> just the properties I need. Finally I call IMAPITable::QueryRows to
>>> retrieve the actual values of the properties.
>>>
>>> Problem: Sometimes, only sometimes, the IMAPITable::QueryRows call
>>> returns SRow data where the value of some of the properties is
>>> MAPI_NOT_FOUND for messages that I know have these properties. These
>>> properties are custom properties. I have never seen the problem occur
>>> for standard Outlook properties.
>>>
>>> Ideas and suggestions are much appreciated.
>>>
>>>
>>>
>>> Best regards,
>>>
>>> Jan Reher
>>>
>>>
>>
>>
>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net