If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Get# for DBF format

Hi,
I am using GET# to read a DBF header.

Here are the declarations

HTML Code:

Private Type HeaderInfo
bytVersion As Byte
bytYear As Byte
bytMonth As Byte
bytDay As Byte
lngNumberRecords As Long
intHeaderLength As Integer
intLengthRecords As Integer
strPadding As String * 20
End Type

Even though the numbers that I get in seem correct, if I add them to a text box each variable is preceeded and followed by unprintable characters - newlines/carriage returns I think. How do I get rid of these as I input the data??

I dont understand how I can read in a long, for example and it returns the correct number but it is preceeded by a carriage return and linefeed. How do I strip the first two character off a long integer?

Now I saw that in the original structure declaration some parameter is defined as Byte. That is quite unusual, because can cause 'padding' problems (that is, some languages automatically expand any paramater to be a multiple of a word)
Are all parameters wrong or only some of them?
Can you post the dbf file you are trying to read?
Marco

Thanks for your help.
I also tried declaring those parameters as String *1, but same problem
I've attached a similar DBF top the one in question... the one I am using zipped to 100.5 kb, and the limit on the forum is 100 kb!