jQuery in Action, 2nd edition*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes delete method in B & S Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "delete method in B & S" Watch "delete method in B & S" New topic
Author

delete method in B & S

mohini lalwani
Greenhorn

Joined: Nov 24, 2008
Posts: 25
When I am deleting record then

database.writeByte(0xFF);

where
database is instance of RandomAccessFile


and when I looked at .db file
I found this character begining of record which i deleted using deleted (recNo)



is it okay ??
because in sun instruction written

"1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record "


let me know
Oyvind Gjare
Greenhorn

Joined: Dec 01, 2008
Posts: 6
Hi Pramod,

are you using a hex editor (like ultraedit) to look at the file?

Oyvind
mohini lalwani
Greenhorn

Joined: Nov 24, 2008
Posts: 25
I am using TextPad to read the file .
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
I think the database file is not as simple as plain text file. To read it correctly, you have to point the RandomAccessFile pointer to the location of that byte and use its readByte() method.


Good Luck !!!

Jeffry Kristianto Yanuar (Java Instructor)
SCJP 5.0, SCJA, SCJD (UrlyBird 1.3.2)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: delete method in B & S
 
Similar Threads
delete method of B&S
Database file wrong, what should I do ?
delete method of B&S
NX:URLyBird About "deleted" flag
DB file -Data section.