How to convert text to hexadecimal in Nav 2005

malintusmalintus Posts: 26Member
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 Hoorn, The NetherlandsPosts: 285Member
    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 Posts: 235Member
    Hex is another way of saying Base16, but never done it or seen it being done in NAV
  • malintusmalintus Posts: 26Member
    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 Posts: 235Member
    edited 2019-04-05
    In that case, maybe System.Data.SqlClient as automation could be the solution
  • malintusmalintus Posts: 26Member
    @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.