Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLyBird what do you use as recNo

 
Leah Knowles
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For URLyBird a recNo is needed to read and update records.

At first I thought the customer ID (owner field) could be used for this but realize all entries to start with have a blank customer ID so this would not make sense.

Do most of you just allocate a number for recNo, for example the first record make it 1, then 2, 3 etc and use this as the key in your map to link to database location? Or any other ideas for what to use for recNo?

Thanks for any advice
Leah
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leah,

First of all welcome to the JavaRanch!

Secondly I simple made the first record 0, second record 1,...

Kind regards,
Roel
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:Secondly I simple made the first record 0, second record 1,...


Roel you made your first record 0? yet weird but not wrong since you got full marks

Leah, I made my first record 1... So the choice is yours.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang,

Don't know why starting at 0 is weird I believe everything in the Java-world is 0-based (arrays, lists,...), so I applied that consistently at my record numbers. Maybe that's just why I got full marks (maybe starting at 1 would give me 399 or 398)

I think starting at 0 or 1 is your choice and both are equal. Starting at 2 or 3 would be really weird

Kind regards,
Roel
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use the records number in order they are appear using 1-based number.


Jeffry Kristianto Yanuar

SCJP, SCJA, SCJD
 
Bob Wheeler
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeffry Kristianto Yanuar wrote:I use the records number in order they are appear using 1-based number.

I'm in favour of the record numbers starting at zero, like in real life

cheers
Bob
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bob Wheeler wrote:
Jeffry Kristianto Yanuar wrote:I use the records number in order they are appear using 1-based number.

I'm in favour of the record numbers starting at zero, like in real life

cheers
Bob



Yeah as long as we don't start the record number from the negative number
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic