How Can I obtain the number that it represents the number in the ascii table for a character?
For example in the table ascii the character '0' (zero) should be rappresent by Alt+48.
There is a function in Navison that it is the equivalent of the VB function Asc or AscW.
0
Comments
i didn´t find a function, but you can do like this
- define two variables... an integer and a char, e.g. nAscCode and cAscChar
- then put your character value to the char variable
cAscChar := '0';
- now you assign it to integer variable, system will perform an implicit type conversion
nAscCode := cAscChar;
The reverse way is possible too (cAscChar := 65; --> result will be 'A')
But be aware! i am not sure if this implicit conversion is done with the ascii table or the sql server codepage. i assume the second.
but if you mainly need a-z, A-Z and numbers it should work like described.
if sby has a nicer way i want to know it too
regards,
schpidi