Using BigText as Var parameter not working

kaspinkaspin Member Posts: 14
Hi All,

I can not get BigText to work as Var parameter in function calls. I need it with web service, like this forum post from mrWho suggests:

http://www.mibuso.com/forum/viewtopic.php?f=32&t=29557&hilit=complex+data+web+service+site%3Amibuso.com&start=15

I made my own table with blob field and exported XMLPort to this field and used blob data to fill my BigText variable. It works when done in OnRun trigger. When calling exactly same code with function, where trying to pass data in BigText variable it fails.

I made two test runs with codeunit:
[TEST 1:]
getPartListBigText(btText);
recTest.FINDLAST;
recTest."Big Text Length" := btText.LENGTH; //"Big Text Lengt" is 3
recTest.MODIFY;

[TEST 2:]
getPartListBigText(btText);
//recTest.FINDLAST;
//recTest."Big Text Length" := btText.LENGTH; //"Big Text Lengt" is 1015346
//recTest.MODIFY;

[b]getPartListBigText(VAR btXML : BigText)[/b]
CLEAR(xmlOutStream);
recTest.FINDLAST;
recTest."Primary Key" := recTest."Primary Key" + 1;
recTest.INSERT;
recTest."Data Field".CREATEOUTSTREAM(xmlOutStream);
XMLPORT.EXPORT(50003,xmlOutStream);
recTest."Creation Timestamp" := CURRENTDATETIME;
recTest.MODIFY;
recTest.CALCFIELDS("Data Field");
recTest.MODIFY;

recTest."Data Field".CREATEINSTREAM(xmlInStream);
btText.READ(xmlInStream);

recTest."Big Text Length" := btText.LENGTH; 
recTest.MODIFY;
btXML := btText;

Any suggestions?

Comments

  • kaspinkaspin Member Posts: 14
    I tried with smaller text, using BigText.ADDTEXT and this seems to work as Var parameter. :-k
    I am using Navision 2009 SP1 with SQL 2005 Express -database on 32 bit environment Windows XP SP3.
Sign In or Register to comment.