When I try to copy MemoryStream data as one piece from .NET side to ABL using Base64 encoding function I get an error - Could not convert LONGCHAR to cpinternal. (11669). But when I try to copy the exact same MemoryStream splitting it into two pieces, it work fine:
This doesn't work:
cBase64 = System.Convert:ToBase64String(rMemoryStream:ToArray()).
This works just fine:
lcBase64 = System.Convert:ToBase64String(rMemoryStream:ToArray(), 0, 24573).
lcBase64 = lcBase64 + System.Convert:ToBase64String(rMemoryStream:ToArray(), 24573, INTEGER(rMemoryStream:Length - 24573)).
What I'm missing?
OpenEdge 10.2B05
Thanks,
Aliaks
[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/simpleExample.p.zip:550:0]
[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/test_2D00_rus.zip:550:0]
I'm experiencing the same problem. I ended up using a StringBuilder to hold the MemoryStream:ToArray() output then concatenate the StringBuilder property Chars to a LONGCHAR variable.