Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I get the record number?

 
long lingyu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know because if there is a deleted record, I can't cal the record number. My method is the (db_file_length-header_length)/One_record_length.
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi long, it would be easy if you can explain the problem situation in more detail. I could not understand what you asked. Sorry.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you want to do this, rite?
Originally:

I think you want the display to be this:

You can still get the record number, but that record is being mark as deleted.
One thing you can do is (what I have done) you do NOT shift the record number. I keep the original display, but I do not allow the deleted record to be displayed. In addition, I hide the record number column, so that the user feel observationally equivalent between the 2 displays.
Since I think the user dont care whether they know the record number, as they need to highlight the record to have a booking, and thus, I simply hide it, rather than displaying it out, and *reconstruct* the numbering.
Nick.
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree I dont think that all active record numbers should have do be sequential, in fact if you didn't count the delected records it would make random access impossible IMHO.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic