Bigtext problem

lubostlubost Member Posts: 623
Hi guys,

there is a step by step description of my problem:
1. I have a picture file (JPG)
2. I have written a small program for conversion (Base64) -> file is converted
3. If I want to stream converted file into Bigtext variable I obtained error message "Overall number of characters in text can not exceeds ..."
My code

Image - Bigtext
Item - Record - 27
InS - Instream

Item.CALCFIELDS(Picture);
IF Item.Picture.HASVALUE then BEGIN
Item.Picture.CREATEINSTREAM(InS);
Image.READ(InS);
END;

What's wrong?
Thank you in advance

Comments

  • dmccraedmccrae Member, Microsoft Employee Posts: 144
    Not quite sure why you want it in a BigText. BigText is intended for large textual not binary data. You should stream into a BLOB instead, and from there it depends what your ultimate goal is - you could copy to a BLOB field, or another stream such as a file.
    Dean McCrae - Senior Software Developer, NAV Server & Tools

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • lubostlubost Member Posts: 623
    Thank you for your answer.
    1. After Base64 conversion picture is in text representation, so it is not in binary format
    2. I need to include this converted file to XML
    3. Customer hasn't CG installed and CG granule, so can not use Biztalk way to fulfill requirement

    Thanks in advance
  • rmv_RUrmv_RU Member Posts: 119
    lubost wrote:
    I need to include this converted file to XML
    Try to use 'Microsoft XML, v6.0'.IXMLDOMText (xmlDomText) object:
    1. Copy BLOB into file or stream object.
    2. By using cycle, read data into a text variable and use the xmlDomText.appendData method.
    3. Append xmlDomText node into the XML document.
    Looking for part-time work.
    Nav, T-SQL.
  • dmccraedmccrae Member, Microsoft Employee Posts: 144
    OK, I'm with you. Does it error on the Image.READ? How big is the BLOB data in the SQL table?
    Dean McCrae - Senior Software Developer, NAV Server & Tools

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • ara3nara3n Member Posts: 9,256
    You don't need CG to do biztalk integration.
    You can do integration using msmq with biztalk.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.