Hi all,
I am trying to get some data from the type 'Microsoft XML, v4.0'. IXMLDOMNode by calling the propery 'text' that returns a BSTR.
eg.
ThisNode.text;
However, there are times when this BSTR will be longer than the 1024 character limit of a Text variable, and I get the following error:
"the length of the text string exceeds the size of the string buffer"
I have been trying to trim the BSTR down to 1024 to stop this error message. I have tried several ways to do this including using the BSTRConnector:
Navision Attain Hash 1.0'.BSTRConverter
CREATE(bcon);
bcon.AppendNextStringPortion(ThisNode.text);
bcon.GetNextStringPortion(OutText, 1024);
CLEAR(bcon);
OutText is just a Text variable of length 1024.
The problem here is that the error still occurs at the line:
bcon.AppendNextStringPortion(ThisNode.text);
The AppendNextStringPortion parameter is a BSTR and ThisNode.text returns a BSTR. Is Navision trying to convert/cast ThisNode.text from the intrinsit BSTR to a Navision datatype (eg. Text), which is continuing to cause this error message?
Is there anyway to declare and Automation variable of type BSTR? I could not find the library it belongs to. Are there any BSTR operators to get a substring of a BSTR?
0
Comments
try:
The ThisNode.Nodevalue are collected in OutText-array
Justin
i am using 'Microsoft Outlook 12.0 Object Library'.MailItem to get CC in SentItems but some mails CC string exceeds the string size (>1024).
i tried different ways to get the string size > 1024 but it show the same error(The length of the text string exceeds the size of the string buffer). Is there any solution to get the string size > 1024.
Thanks & Regrads,
naidu. ](*,)