TPComponent.DefineVariableExt('Customer.Balance', FORMAT(Cust.Balance), TPConst('NUMERIC_LOCALIZED'));
CLEAR(BigTextVar); CLEAR(InS); Cust.CALCFIELDS(Cust."BLOBField"); Cust."BLOBfield".CREATEINSTREAM(InS); BigTextVar.READ(InS); //it's just an example, I'm to tired at 19:15 to write out the loop for it's sake, just imagine the loop here :))) bcon.ResetBSTR; CLEAR(t1000); BT.GETSUBTEXT(t1000,1,1000); bcon.AppendNextStringPortion(t1000); CLEAR(t1000); BT.GETSUBTEXT(t1000,1000,1000); bcon.AppendNextStringPortion(t1000); CLEAR(t1000); BT.GETSUBTEXT(t1000,2000,1000); bcon.AppendNextStringPortion(t1000); TPComponent.DefineVariableExt('LongBigYadaYada',bcon.BSTR, TPConst('TP_TEXT'));
Comments
I know there are some post that mention this automation as a solution, but it's false.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
If you use RTC or Web Services you can use BigText directly as a parameter to a method expecting a string - and you can get things from a method returning a string of any length adding that to a BigText in ADDTEXT.
http://blogs.msdn.com/freddyk/archive/2008/11/04/transferring-data-to-from-com-automation-objects-and-webservices.aspx
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
The basic problem is that this OCX only accepts BSTR parameters which NAV understands as text. Freddy, is there any special reason why NAV refuses to give a BigText variable to an OCX that expects a BSTR - what is a BigText internally, if not a BSTR?
And this OCX cannot read a stream, nor a file, nor has it a method that would add to the variable instead of overwriting it...
I suppose it would be the same trying to force it into XMLDOM...
Would it be possible to write a .NET OCX object that would take the instance of the non-.NET OCX object I'm struggling with plus a BigText variable or InStream or whatever and would feed the later into a method of the former? If yes could someone give a rough sketch of pseudocode how?
Any other ideas? Thx.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n