So the .db file that is included with the assignment as we all know does not have record numbers. In the comments for the read method ni the DB interface for example, it says to read from the file on the basis of the record number being provided as an argument. Am I missing something here? I am kind of and right now.
Hi There isnt actually a record number associated with each record in the data file! It is something you would have to come up with. Have you been able to read the data file successfully(i.e Magic cookie,field length,field names, length of each field..you know the whole works..) Then you would hit the data section where all the records are. With the associated recordLenght and also where the data starts you could come up with an algorithm to jump to a particular record in the data file! I hope this helps. Check this out! I asked a similar question: https://coderanch.com/t/187713/java-developer-SCJD/certification/read-method [ January 07, 2006: Message edited by: Saheed Adepoju ]
Thanks for the reply. Yes I have been able to read the data from the file...it wasnt a problem once I figured out what was going on. Yes I do know that the record number is not provided and that it is up to us to deal with it. I will check out your linked thread and get back if I have any further questions. Thanks for the help! The brain hasnt been working well lately! [ January 07, 2006: Message edited by: Surya De ]