Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database file wrong, what should I do ?

 
Fernando Franzini
Ranch Hand
Posts: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers
I realized that my database file provided by assignment zip is wrong !!!
My assignment say:
......
Data section.
Repeat to end of file:
1 byte flag. 00 implies valid record, 0xFF 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
.....

This missing a byte (00 or 0xFF) at the end of the last record.
Someone can chek for me ?
So what should I do ? Just put this missing byte and submit my project or do I send an email complaining about it ?
Regards.
 
Carlos Morillo
Ranch Hand
Posts: 221
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't quite clearly understand your message but just in case, if you are reading a single byte for the Valid Status of a record you need to use readUnsignedByte() since 0xFF is 255 as an int and the maximum value of a signed byte is 127.

Hope this helps,


Carlos.
 
Fernando Franzini
Ranch Hand
Posts: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Carlos
Thanks for sugestions...it dont help.
I open the file in Hex editor and is missing the last byte -> 00 or 0xFF !!!
What I mean is....in the end of each record must have a byte 00 or 0xFF and...in the last record DONT HAVEEEE !!!
I think i'll send an email to SUN reporting it....
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fala Fernando!

Champion, did you try reading it with the DBFileReader tool?

Which one is your assignment?

So what should I do ? Just put this missing bit and submit my project or do I send an email complaining about it ?


Hum... no. You have to send the same file that was downloaded by you when you got your project. Anyway, if you really think that your .db file has some problem, you can send an email to who2contact@sun.com. But it is really weird...
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12012
216
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fernando

My reading of your post:
  • According to your instructions the delete flag comes before each record.
  • According to your post you are looking for a delete flag after each record.


  • Am I reading your post incorrectly?
     
    Fernando Franzini
    Ranch Hand
    Posts: 489
    2
    Java Spring Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Andrew
    I'm lost now lolll.....
    My instructrions say:
    Data section.
    Repeat to end of file:
    1 byte flag. 00 implies valid record, 0xFF implies deleted record

    in the end meaning=after each reacord...
    Am I wrong ?
     
    Roberto Perillo
    Bartender
    Posts: 2271
    3
    Eclipse IDE Java Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Oh, right. The thing is, this flag does not appear in the end of the record, it appears just before the record. The Data section repeats until the end of file.
     
    Fernando Franzini
    Ranch Hand
    Posts: 489
    2
    Java Spring Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Yeahhh Roberto !!
    You are right !!! The delete byte indicator is before record !!!
    I realy misunderstood !!!
    Sorry about false alarm lollllll
    Thanks again for help.
    Regards.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic