Random Access Vb6 Do While Not Eof Delete Record
- Random Access Vb6 Do While Not Eof Delete Record In Firefox
- Random Access Vb6 Do While Not Eof Delete Record Video

Note you don't need to do a loop to write. SFinal contains the complete text of the File ready to be written at one shot. Note that input reads a LINE at a time so each line appended to sFinal needs to have a CR and LF appended at the end to be written out correctly on a MS Windows system.
There are couple of issues in this code. You are writing 12345 and looking for 123456 in delete (simple one). If you look at what writeBytes method does, it creates a byte array of size equal to the length of the string you write. Which in your case is zero, so nothing gets written. So what you need to write is a string whose length is same as the number of chars you want to delete (think of xxxxx as delete string as referred in other posts)Side note: You are setting file pointer to zero in the beginning of the loop which will change after your first read, so you need to keep track of the file pointer. Since the delete happens on char by char, you need to find the length of the record and construct the 'delete' string.Btw, if you want to actually get rid of the deleted characters, you are better of reading the file of to a buffer, do all the read & write then dump the file back.
Random Access Vb6 Do While Not Eof Delete Record In Firefox

Random Access Vb6 Do While Not Eof Delete Record Video
Just writing white space chars (or empty string) wont move the characters forward.