• 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

NX:deleted flag as a field

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the urlybird data file,there is a two-byted flag which shows whether a record is deleted(0x0080 stands for being deleted) .
So,i want to treat this flag as a field
like "name","location"...
please tell me is this acceptable?
THX!
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, it's like a field, but it has special properties. When you do a read(recNo) and return a String[] containing the field values, I don't think you should return the deleted flag as one of those fields. For one thing, the instructions never call it a "field", and never really imply it should be treated the same as the others. For another, there's no point really in returning its value, because if you're returning any values, the deleted flag must be false. Because if deleted were true, you're required to throw RecordNotFoundException rather than return. Users should never be able to see a deleted record anyway - the only records displayed are those where the deleted flag is false. So the user doesn't need to actually see the deleted flag - it's useless. Does that make sense?
 
ryan huang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you jim
 
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic