>Is there a function or an easy way to convert Binary data to ASCII data?
It depends on what you mean here. Binary data and ASCII data are essentially the same thing - long sequences of 8-bit bytes. ASCII data doesn't contain some specific byte values that aren't represented as printable characters, and typically, an End-Of-File character (CHR(26) in VFP terms) is used to indicate the end of the ASCII text file. Binary data can contain any and all values, and since all values can occur anywhere in the file, no specific character marks the end of file - the operating system or device has to tell you when you've reached the end of the data.
Since binary data can contain non-printing values, some alternate means of representation must be used to make it readable. One of the more common approaches is hexadecimal display representation, which uses two ASCII characters per binary byte, each character value repesenting a hexadecimal digit. For example, a EOF character (CHR(26)) above would be represented as the string
1A: (
1 * 16) +
A(10). You can use the TRANSFORM function to convert the value of a byte from a binary file (ASC(
byte in string)) for output purposes.
If this isn't what you mean, please tell us what the difference is between the binary file that you have and the ASCII representation that is needed.