• 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

B&S: Does DB.read() return Record Number, recNo -- I think not?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The interface DB has a read method:


I am not currently returning the recNo in this String[], because the database file itself does not have a notion of record numbers. (They get calculated on the fly by the database implementation).

Would anyone disagree with me on this? Do you think I need to return the recNo in that String array?


jaw
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I didn't return the record number in the String[], and I really believe that there is no need to do so.
 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I agree, no need. Especially since the recNo is passed as argument, so the caller knows which record he's receiving..

Regards,
Alex
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jonathan Wolter:
The interface DB has a read method:


I am not currently returning the recNo in this String[], because the database file itself does not have a notion of record numbers. (They get calculated on the fly by the database implementation).

Would anyone disagree with me on this? Do you think I need to return the recNo in that String array?


jaw



I think there is no need but it doesn't violate the specification. You can put this info as the last element of the array. In the specs, at least in mine, there is no constraint about the string array or string array representation of the record.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic