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

Read all the records

 
Richard Jackson
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello,every one
I have gotten some required info(such as file header,field length,field name,record count) from the .db file.
I should do what things to continue read/write all the records in the low-level database?
Regards,
Richard
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Richard,
While I appreciate you starting a new topic when you are changing your question, you shouldn't really post the same question in both the new topic and the old topic.
As I mentioned in this thread, you should:
As you read each column name and column size in the schema, store them in a collection.
Then when you get to the data section read the delete status flag, then for each item in your collection, read the appropriate number of bytes and convert them into a String for the value for that column.
Repeat until end of file is reached (or until you have read the calculated number of records).
Now - you have two threads with essentially the same question in both. Ideally there should only by one such thread. Could you please pick one that can be closed, then all answers can appear in the remaining thread.
Thanks, Andrew
 
    Bookmark Topic Watch Topic
  • New Topic