CXTPCalendarCustomProperties |
Post Reply |
Author | |
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
Posted: 16 April 2008 at 3:57pm |
Hello,
With version 10.42 I have tried using the CXTPCalendarCustomProperties portion of the Calendar system. It seems to have a problem or I'm not using it properly. I am able to successfully SetProperty and GetProperty from the data record during one program execution. The problem is that the property "name" is not reloaded to m_mapProperties when you start the program again. The records contain the data and keys but you cannot reach them because the "key" is no longer in the map. Thus: in XTPCalendarCustomProperties.cpp: BOOL CXTPCalendarCustomProperties::GetProperty(LPCTSTR pcszName, COleVariant& rVarValue) const { return m_mapProperties.Lookup(PrepareName(pcszName), rVarValue); } fails every time since the name is not loaded to m_mapProperties. It is not added to the map again until you do a SetProperty(); Is there a mechanism to set and load custom property keys to m_mapProperties that I'm overlooking? Thank you in advance for any help you can provide. |
|
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
|
Solved:
I isolated the problem to the CustomPropertiesXMLData data field in my mssql database where I try to retrieve the properties in ptrEvent->GetCustomProperties(); CustomPropertiesXMLData was set as nText data type. Whenever it tried to load that to _bstr_t it failed. I changed the field definition type to nvarchar(255) and now it reads the data fine and loads up the key map properly. I really don't know why _bstr_t cannot "read" nText but that was the cause of the problem. If anyone knows why please let me know as I am most curious as to the reason it fails. I probably just don't know enough about _bstr_t limitations. Hope this info comes in handy to anyone else who's experienced this problem. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |