• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S Question regarding the DB interface methods

 
Surya De
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Saheed Adepoju
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
http://www.coderanch.com/t/187713/java-developer-SCJD/certification/read-method
[ January 07, 2006: Message edited by: Saheed Adepoju ]
 
Surya De
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic