Simplicty and flexibility!


New Function in 8 - WriteToFile() - Write/Append a string(256) to a file. (Ver. 8.0.0.1146)

Started by DataEase
You will need to Sign In to be able to comment on the Blog!

New Function in 8 - WriteToFile() - Write/Append a string(256) to a file. (Ver. 8.0.0.1146)

This function is part of a triumvirate, where the other functions are MemoWriteToFile() and MemoReadFromFile().

This function is complimentary, as it will write the content of a "normal" DataEase field or function to a Text file. Ex. WriteToFile("This is a test", "textfile.txt",0)+WriteToFile(chr(13),"textfile.txt",0) will first append the text "This is a test" to textfile.txt, and it will then add carriage return via the next function call with function chr and value 13=ASCII carriage return.

With this function you can export from a dql, or directly from a form etc, any field content etc and build an export file (or any other file) as you see fit. You can then later import via normal import functions, or you can use MemoReadFromFile() and MemoDecodePair() to read and decode a file.

Mode: 0=Append 1=Overwrite 2=Delete 3=Insert at begining. Again....use your imagination!


Written by DataEase 16/10/12 at 16:41:16 Dataease [{8}]FIVE
DG3_BlogList