Last post Jul 08, 2020 10:51 PM by robby32
Jul 08, 2020 11:27 AM|robby32|LINK
I have a config Object like ConfigObject and the filed members are
field 1, filed 2, field 3 , field 4 , field 4, field 5,field 6, field 7 and they are all strings.
Now when i only want to update 1 or 2 fileds at certain times.
At the moment i read the whole config file get the values and only update the required values and then write it back.
Is there a way i can directly update only the fields instead of reading , saving and then writing back ?
Jul 08, 2020 04:05 PM|bruce (sqlwork.com)|LINK
if the replacement strings where the exact same length as the old strings, then you could do a disk update in place, otherwise you need to write out a new file.
Jul 08, 2020 10:51 PM|robby32|LINK
thanks , i didnt consider that. They arent the same length, so i do need to write out a new file.