• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DataFile problem

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a problem with my data file. My assignment is B&S. As for all the datafiles, each record has got a delete value which is at the end of each record.
The delete value is of 1 byte which could either be 0 or 1. To This point everything is okay.
However, My file contains 28 records. Only the last record in this case does NOT have a delete value. When this value is read,it simple returns -1 and throws eof exception.

The problem now is the absence of this value will affect the order of the table if more records are to be added. Aslo, I get and exception from this missing byte.

Any suggestion please.
Cheers.
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

which is at the end of each record



Are you sure? Normally the delete flag precedes each record. Take another look at the description in your instructions.

What version is your B&S exam?
 
Abiodun Okusolubo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much, I assumed it was at the end. Now, I'll have to check my design again. Thank you very much again.

Cheers
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more thing: I just noticed that you wrote that the delete flag was one byte. Is it not two bytes (a short)? Mine is for B&S version 2.1.2.

How's it going?
 
Abiodun Okusolubo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks very much for your concern, mine is actually 2.2.1. However, it is 1 byte, so I use getByte.
Cheers.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I'm a newbie here. I also have B&S assignment. Where is it that I can check the version? Could 2.3.1 be a verison?

Thanks
Sanjay
 
Abiodun Okusolubo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2.3.1: Yep,
Looks very much like a version number. On my assignment, the version number is found in bold letters on the top of the html instruction page.

Later
 
Sanjay Mistry
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Abiodun ...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic