Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read Binary File - Save to Access record

Status
Not open for further replies.

thankgodfortektips

Programmer
Dec 20, 2005
95
KY
Hey All,

I have to create a program that will read a binary file and save the data into an access db. I can sort out the saving to DB part but I just need to know how to read the binary file.

I have never done this before but was researching on the net and found this There is a sample project which when I run it, looks like it is reading the first field of the binary file. I have a complete table of the format of the binary file showing Field No, Data, Symbolic Field Name, No. of digits (nibbles), Field Values and field types, Offset (nibbles).

Here are the format of the first couple of fields.
*************************************
Field No|Data|Symbolic Field Name|No. Of Digits(Nibbles)|Field Values And Field Types|Offset (Nibbles)|
*************************************
1|RECORD CODE|RECCD|2|F7 HEX|0
2|ENTRY CODE|ENTRYCD|2|00 to 99 BCD|2
3|VERSION NO|VERINFO|4|00 to 99 BCD|4
....
*************************************
Could anyone either help me adapt the code from the link or help me with some code to read each field.

Thanks in advance!!!
 
Quick guess?

1. Build a Record Set that describes you data record as bytes

2. Read each data record into the defined record.

3. Massage this Record Set and write it to the Access DB

General description but I just finished doing the same thing and this is about the way I went about it.
 
thanks engcon, but unfortunately with the advise given I am no closer to my goal... is there any chance you can provide some code/project???

 
Suppose you post the code that YOU have written based on the advice given, and we will attempt to help you with it.

Bob
 
unfortunately I dont have any code apart from the above listed project. I am completely at a loss with this project.

Any code would be great!
 
You have previously been referred to faq222-2244. Re-read paragraphs 8, 9 and 10. If you want your work done for you, look for a code repository rather than using Tek-Tips

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
While I agree entirely with John, I'll also see if I can help you a bit. If you want help, you need to give the feeling that you have made a good faith effort to solve the matter on your own. You haven't really done that.

The way to solve problems is to break them down into smaller problems, and solve each of them one at a time. When engcon breaks your problem into three, you say you are no closer to your goal than before. Well, I don't agree. You're a little closer (unless your goal is to have someone do your work for you, and I really don't think it is), and you don't seem to recognize that. So, take those three steps, break them down a bunch more, solve the ones you can, and THEN come back for help on the ones you're having trouble with. You're likely to get a lot more help then.

HTH

Bob
 
ok guys, sorry if I seemed like I haven't done anything on this... but I really dont have a clue were to start and doing 2 people's work load at the minute... I will find a solutions else where...

Thanks anyway...
 
Well, it's the teacher in me...but yes, we can't save everyone. :)
 
Bob,
After a while with a particular poster I harden. Sometimes you have to check in the top left hand corner of the page and see if its still there
[COLOR=white blue]INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS[/color]
Ah yes, it is! I feel happier now [smile]

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
After perusing some of your other posts, thankgodfortektips, all I can say is that if you're "that busy" running your IT company, you must have sufficient revenue coming in to pay someone else to do your work for you. If not, maybe you're in the wrong line of work. If so, please let me know and we can talk about a retainer....

Thanks,

Bob Rodes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top