Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Junk value in BLOB

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I read a text document and then save it in a BLOB field in NAV. Reading function works fine and my problem is every time when I assign my text to BLOB field and read it back, it shows some junk values in the start of the text. 

It is same value all the time and it always comes in the start of the text. 

I check the text file and it does not contain any value like that and then I check the read message from NAV and it does not have the junk value also. 

This only happen when I write my text to BLOB. 

How to overcome this issue. 

*This post is locked for comments

  • Suggested answer
    4BzSoftware Profile Picture
    4BzSoftware 6,071 on at
    RE: Junk value in BLOB

    Hi Dushan,

    I faced this problem when I developed Query and Excel Report tool, the email body. Just clear the BLOB field before update new text:

    //S-002{

    CLEAR("Email Body");

    IF (gTxt_EmailBody.LENGTH > 0) THEN BEGIN

     "Email Body".CREATEOUTSTREAM(lOuS_OutStream);

     gTxt_EmailBody.WRITE(lOuS_OutStream);

    END;

    //S-002}

  • Verified answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: Junk value in BLOB

    or If you know the place of the junk value in the text then you can delete it with the following code

    DELSTR(text, startPos,endPos);

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Junk value in BLOB

    check the blob field properties: it should by of (sub)type memo (not image/bitmap).

    also try using compressed=no.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans