Hallo everyone,
the text I want to receive is no XML, it ist Text like CSV.
Name DataType Subtype
WebClient Automation 'Microsoft WinHTTP Services, version 5.1'.WinHttpRequest
URLString := '
http://www.trendmicro.com/ftp/products/tsc/readme.txt'; (for example)
WebClient.Open('GET', URLString, FALSE);
WebClient.Send();
Getting the Text from WebClient.ResponseText runs into
Microsoft Dynamics NAV
The length of the text string exceeds the size of the string buffer.
Getting it from WebClient.ResponseBody gives me the whole data in a
binary format.
Does anyone know how to convert this data to text without writing it to the disk ?
Finally it should be placed in a BLOB to handle with BigText.
Thank You for your attention.
Achim
Comments
WebClient.Response(Stream);
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
This is my solution:
Name DataType Subtype Length
InStream InStream
OutChar Char
OutInt Integer
InStream := WebClient.ResponseStream;
WHILE NOT InStream.EOS DO BEGIN
OutInt := InStream.READ(OutChar,1);
// to check every character
END;
CLEAR(WebClient); // Important ! to avoid the error message
This solution works also with Textlines > 1024
Regards
Achim
if the response is an xml file, you can use msxmldom.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n