Originally posted by Stefan Wagner:
I guess you have to close the connection and reopen it with the new username/ passwd.
Originally posted by Stan James:
You can only update fields like that when they are exactly the same length. You can't insert or delete any characters in your file, only overlay them. I'd read the file with readln(),change lines as I find them and write a new file. Here's a scheme I've mentioned before:
write new temp
close original and temp
rename original to backup
rename temp to original
You can read & write at the same time - read one, write one - or read the whole file into memory, modify it in memory, write it all out to disk. Either way works.