• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!