OnRun() MESSAGE('0x%1',ConvertBase16('Hogan')); LOCAL ConvertBase16(theInput : Text[512]) theOutput : Text[1024] FOR aIndex := 1 TO STRLEN(theInput) DO BEGIN aInt := theInput[aIndex]; aLeft := ROUND(aInt / 16,1,'<'); aRight := aInt MOD 16; theOutput += HexValue(aLeft) + HexValue(aRight); END; LOCAL HexValue(theValue : Integer) : Text[1] CASE theValue OF 0..9: EXIT(FORMAT(theValue)); 10: EXIT('A'); 11: EXIT('B'); 12: EXIT('C'); 13: EXIT('D'); 14: EXIT('E'); 15: EXIT('F'); END;
Answers
Edit: Found this post https://forum.mibuso.com/discussion/5735/post-of-code-base64-encoding-and-decoding
select distinct convert (varbinary, 'Hogan') as Employee
I get the following
Employee = 0x486F67616E
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.