Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an SQL database field, having value in ASCII format, how to show that text in readable format in qvw??
Sample value:
0C01000000A0DEB76FCDE7D54EB64EBC85E527D561000000000000000001000000
I know I said.
I don't now the format of your string.
According to ASCII table your text is something like ' Ю·oНзХN¶Nј…е'Хa'.
The script returns an empty string because there are zeros wich means 'end of string'.
You can write a maco function that converts ASCII string into text string.
Then you can simply use it in the load script.
Can you help me in writing macro?
I don't now the format of your string.
I writed a sample for a simple byte ASCII encoding (for example 596F752063616E20646F206974).
Macro:
function ASCIIToText (str)
Dim result, x
ASCIIToText = ""
If Len(str)<2 Then Exit Function
If Len(str)=2 Then
ASCIIToText = Chr(CByte("&h" & str))
Exit Function
End If
result = ""
For x=1 To Len(str) Step 2
result = result & ASCIIToText(Mid(str, x, 2))
Next
ASCIIToText = result
End function
Now in the load script you can use ASCIIToText as any other function:
LOAD
ASCIIToText(ASCIIValue) as TextValue
Resident SomeTableWithASCIIData;
This macro is giving me null.. do you have any idea why??
Can you test your macro with the sample data i provided above please
I know I said.
I don't now the format of your string.
According to ASCII table your text is something like ' Ю·oНзХN¶Nј…е'Хa'.
The script returns an empty string because there are zeros wich means 'end of string'.