File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S: Record Numbers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "B&S: Record Numbers" Watch "B&S: Record Numbers" New topic

B&S: Record Numbers

Talib Ali

Joined: Feb 23, 2008
Posts: 8

Sorry if this topic has already been discussed I searched but could not find it.

According to given DBAccess interface it is required to use "long record Number" on multiple places. The provided database has no record Number field, atleast i think this.

As we have to reuse this (long)record Number value so i could not understand where i have to store it. do i have to make a new field in the provided database file or is there any way to manage it without altering the current database file.

I will be very thankful for your response in this regard.
[ March 01, 2008: Message edited by: Talib Ali ]
mohamed sulibi
Ranch Hand

Joined: Sep 04, 2005
Posts: 169

You not allowed to alter any things in the provided DB file. so you can
consider the relative position in the file as record number.
ex : start data section == record number 0.
start data section + (( size of the record ) * record number ) = record number data.

i get this information from this forum. there are many topics on this issue.

best regards.
Mohamed Darim.
Talib Ali

Joined: Feb 23, 2008
Posts: 8
Thanks Sulibi, I think its the easiest solution.

Its one drawback that can messup is that after getting maximum limit (long) it'll start in negative numbers.

I think some material passed under my eyes where people used Hashmap or System.currentTimeMillis() for forming recNo. I dont know the exact reason of this logic.

Best Regards!
Joe Math

Joined: Jun 01, 2007
Posts: 4
No Probs, You can edit the DB file, provide you should mention that in your documentation why && what you done soo.

Its basically a decision making scenario where you need to decide, in real time projects.

Talib Ali

Joined: Feb 23, 2008
Posts: 8
Thanks! for feedback
I agree. Here's the link:
subject: B&S: Record Numbers
jQuery in Action, 3rd edition