Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DB file reading - inconsistent results

 
Vrinda Werdel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I am having trouble seeking a particular record number and reading that record. Here's what I am doing. Pl. let me know where I am going wrong. I store the values of the dataFilePointer and recordLength when I read the schema section. (I am doing the URLy bird assignment. In my case dataFilePointer has a value 74)



I am getting inconsistent results. Pl. help.

thanks


Vrinda
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12056
232
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vrinda,

Take a look at the bold section in the following code:

Shouldn't you be including the size of the "delete flag" in that calculation?

Regards, Andrew
 
Vrinda Werdel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Andrew. This worked.

regards

Vrinda
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!