Takes a single file (DBF or otherwise) or a DBF/MEMO pair and encodes it into a string. String includes a header for verification and information about the file. Use DecodeDbf() to restore the string to a file.
The file to be encoded cannot be in use.
o.EncodeDbf(lcDBF, llHasMemo, lcEncodedName)
Return Value
Encoded string of the file. If the file can't be encoded a blank string is returned in which case you can check the cErrorMsg property.
Parameters
lcDBF
Name and path of the DBF file to encode.
llHasMemo
If the table has a memo field set this flag to .t. Both the DBF and FPT will be encoded into the string result
lcEncodedName
Optional - name of the file embedded into the string
Remarks
Header is 105 bytes plus the concatenated content of the DBF + the FTP file if any.
wwDBF 5 bytes
DBF FileName 40 bytes
Length of the file as a string 10 bytes
FPT Filename 40 bytes
Length of the FPT file 10 bytesThe FPT length must be buffered as an empty string (50 bytes) if not available.
The actual file content is simply concatenated and decoded based on the lengths described in the header.
See also:
West Wind Web Connection© West Wind Technologies, 2023 • Updated: 05/02/13
Comment or report problem with topic