Binary Write to DBF file



Problem: Programmically changing the record count in a dbf file

No matter what I test, nothing seems to work. This is just an example
of what I want to do.

In the dbf header there are bytes that indicate how many recorrds are
in the dbf file. for example

record count: 255

How would I convert it to hex where my byte string would = "FF 00 00
00"

if my record count was 6,233 how would I convert that to a hex number
that is spread out into 4 byes?

I really dont think my code sample would be helpful. I am just trying
to figure out the way you do this. do I convert it to a hex and then
convert hex to a byte? or byte to hex?

I hope I am not confusing anyone I am just learning the dbf file
structure and how to write bytes in bynary format. Currently everytime
I try to write to a dbf file I get the wrong byte value.

.


Loading