hi,
I know that does not solve the problem but I'll give you some links and examples
BLOB Fields
If you are using NAV BLOB Fields; by default the Compressed property is <Yes>, which means the value is zipped and not usable externally; Change this property to No and the value will be the binary of a normal bitmap format (provided that is whats stored there) which you can extract and display externally.
Some samples & links
NAV export samples:
//EXPORT
// export blobs as bmp files
CALCFIELDS(Picture);
IF Picture.HASVALUE THEN BEGIN
PictureFileName := FormatFileName(FilePath,Item."No.");
Picture.EXPORT(PictureFileName,FALSE);
END;
//STREAM
tem.GET('1000');
item.CALCFIELDS(Picture);
IF item.Picture.HASVALUE THEN
BEGIN
Item.PICTURE.CREATEINSTREAM(InStrm);
DOWNLOADINTOSTREAM(InStrm, 'Save image', 'E:\', '*.bmp', '');
END;
Form 346 ...
IF Picture.HASVALUE THEN
Picture.EXPORT('*.BMP',TRUE);
CODE\ENCODE64
Use Encode\Decode 64 functions to convert a BLOB to Base64
ex: Codeunit 99008516 - BizTalk XML DOM Management
Function 'GetPicture' converts a Base64 encoded DOM node to binary and imports it into a BLOB.
Function 'AddPicture' converts a BLOB to Base64 encoding and adds it to an XML doc...
You can use Encode\Decode 64 functions on sql server stored procedures, views, sql scripts
Basically, a BLOB field in NAV contains a byte-array, so the challenge is how to read or write this byte-array and use it in the conversion methods. In .Net we can use Stream objects to work with byte-arrays.
.NET Base64 encoding\decoding
To convert a Base64 string to binary data, we can use the "Convert.FromBase64String" method. It accepts a string as input parameter and returns a converted byte-array.
To convert binary data to a Base64 string, we can use the "Convert.ToBase64String" method. It accepts a byte-array and returns a Base64 encoded string.
To exchange binary data in a web service, it is common use to convert the binary data to Base64 encoding. The .Net Framework has built-in support for Base64 converting with the System.Convert class.
Good link this:
www.kauffmann.nl/.../binary-data-with-nav-web-service
How to import and export BLOB fields using Dataports in Navision
support.microsoft.com/.../874348