Forums Register Login

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

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Hi,

I didn't return the record number in the String[], and I really believe that there is no need to do so.
+Pie Number of slices to send: Send
Hi,

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

Regards,
Alex
+Pie Number of slices to send: Send
 

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.
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 989 times.
Similar Threads
lock & read or just read?
B&S 2.3.2 record number
URLyBird 1.2.1 - SecurityException
Throw and System.out.println ?
[NX URLyBird]: About deleted flag in URLyBird
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:34:23.