All,
So I am trying to save the user settings of an UltraWinTree to a CLOB field in the DB. I used the example in http://communities.progress.com/pcom/message/84719 and this works fine for saving Grids, Explorer Bars etc but with TreeView it fails. The treeview has quite a few nodes. When I run the code it fails on the last line below with the error msg: Attempt to exceed maximum size for a CHARACTER variable (9324). I checked the CODE-PAGE and it is correct. If I remove a node or two from the TreeView to make the overall XML smaller it works fine. I'm hitting a limit here but don't know why. Using 10.2B.
DEFINE VARIABLE cXML AS LONGCHAR NO-UNDO.
DEFINE VARIABLE ms AS System.IO.MemoryStream NO-UNDO.
DEFINE VARIABLE obj1 AS System.Text.UTF8Encoding NO-UNDO.
ms = NEW System.IO.MemoryStream().
UltraTree1:SaveAsXml(ms).
obj1 = NEW System.IO.MemoryStream().
cXML = obj1:GetString(ms:ToArray()).
Thanks,
Brad
Just a random longshot here, try:
FIX-CODEPAGE( cXML ) = "UTF-8":U.