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
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}
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);
check the blob field properties: it should by of (sub)type memo (not image/bitmap).
also try using compressed=no.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,134 Super User 2024 Season 2
Martin Dráb 229,928 Most Valuable Professional
nmaenpaa 101,156