_void_
2nd February 2004, 11:13
How to insert (not overwrite) text in the current file position when handling files with seq.* functions?
mark_h
2nd February 2004, 16:09
I think they way we did it was to move the text to a file. Then they read through the file writing to another temp file, they insert what they want where they want it, then write that text back to the text tables. Never done this myself, but I think that is how others in my office did it.
Mark
NPRao
2nd February 2004, 21:09
Refer to the link - Unable to append a string at start of the file (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=10432)
_void_
3rd February 2004, 13:06
Thanks for the link. Unfortunately as jaapzwaan writes in the thread it (seq.puts()) only works in the case of replacing text of same length not actually inserting.
So I guess it has to be done by using either temp-files (as Mark suggests) or by reading the whole content of the file to a variable, handling it there and re-writing.