maybe i'm overlooking something, but i cannot see why you should want to split "update" into "delete" & "create" (assuming that your lock mechanism works ... ;-) ) a simple lock-change-unlock will do the same, don't you think?
plus (better: minus): an updated record can have a new number / position in the data file. this would make the algorithm unneccesary complicated. you'll be glad about consistent record numbers when it comes to gui-handling...
the rest is okay, obviously.
many greetings, jan
Joined: Aug 31, 2005
Thanks for the reply! If this is the case,then im gonna do something like this instead,
readByte(); for the flag writeBytes(String) -> Does this overwrite the existing string in the file or does it insert this to the file and move the existing ones to another location in the file?
Joined: Feb 03, 2004
well, i used a RandomAccessFile, it's pretty simple: you jump to a position and write the next bytes, overwritting whatever was there before.
i'm sure there are different ways, but i found this one most suitable ;-)