How to convert text to hexadecimal in Nav 2005

malintusmalintus Member Posts: 32
Hi,
I need to export data by XMLPort but as a hexadecimal values. Since Nav 2009R2 is possible by DotNet but in nav 5.0 is not possible to use it, I think.
Do anyone have some ideas how text could be converted to hex in this ver. of Navision?
Regards
Malintus

Best Answer

Answers

  • DuikmeesterDuikmeester Member Posts: 308
    edited 2019-04-05
    I think you mean BASE64. Which is commonly used to embed binary data in XML-files.

    Edit: Found this post https://forum.mibuso.com/discussion/5735/post-of-code-base64-encoding-and-decoding
  • TallyHoTallyHo Member Posts: 417
    Hex is another way of saying Base16, but never done it or seen it being done in NAV
  • malintusmalintus Member Posts: 32
    edited 2019-04-05
    @Duikmeester No, I mean BASE16. Generally I want to achieve the same thing what I can achieve from t-sql query. I mean:
    select distinct convert (varbinary, 'Hogan') as Employee
    I get the following
    Employee = 0x486F67616E
  • TallyHoTallyHo Member Posts: 417
    edited 2019-04-05
    In that case, maybe System.Data.SqlClient as automation could be the solution
  • malintusmalintus Member Posts: 32
    @Duikmeester Thanks, it's working perfectly and it was much more simpler that I thought.
    I tried to use ADO and SQL select command to replace it but I had problems with receive data from my query. Your script working perfectly. Again thank you a lot.
Sign In or Register to comment.