• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Another Doubt in URLyBird 1.1.2

 
rohan tiwari
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
I have another doubt .
The data section of my file states:

"Data section. (offset into file equal to "offset to start of record zero" value)
Repeat to end of file:
2 byte flag. 00 implies valid record, 0x8000 implies deleted record
Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information "

Does this mean that whenever I write a new record I must first write a flag 00 to mark the record as valid.Also does it mean that when I delete a record I must simply write a flag 0x8000.But in that case the record would be in the file and only the flag would change, the file will keep on growing in size.
I think that I am interpreting the entire thing incorrectly.
 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

yes, when you add a record, you must flag it as valid, using your 00 flag.
And when you delete a record, you simply overwrite the flag with your deleted flag.

On one hand the database file will grow, on the other hand, according to your "create" method (most probably, but check to be sure), added record should reuse a deleted record.

Regards,
Alex
[ January 13, 2008: Message edited by: Alex Belisle Turcot ]
 
rohan tiwari
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Alex
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic