dot net array to text

DreckigerDan
Member Posts: 3
I have the following problem:
There is an image stored in a BLOB field and i want the binary or hexadecimal value of it.
I tried the following approach but there are several problems/questions:
Regards,
DreckigerDan
There is an image stored in a BLOB field and i want the binary or hexadecimal value of it.
I tried the following approach but there are several problems/questions:
- How do you cast the values of the array to text?
- How do you convert the text to hex or binary?
- Is there a more efficient solution?
Record.CALCFIELDS(Picture); IF Record.Picture.HASVALUE THEN BEGIN Record.Picture.CREATEINSTREAM(InStream); DotNetMemoryStream := DotNetMemoryStream.MemoryStream(); COPYSTREAM(DotNetMemoryStream, InStream); DotNetArray := DotNetMemoryStream.ToArray(); FOR i := 0 TO DotNetArray.Length -1 DO BEGIN //?? END; END;
Regards,
DreckigerDan
0
Comments
-
I assume you want the data to export it to another system?
If so, I would suggest just converting the blob to base64 instead.
More efficient, no need to create loops. Just one line of code.0 -
I need the binary/hex data to use it in an RTF document I create in Nav. I tried Base64 and used the string for my document.
{\pict\pngblip\picw250\pich250\picwgoal250\pichgoal250 Base64String}
The picture isn't displayed.
Thank you for your help.
DreckigerDan0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions