Re: Help reading structured binary files



J French wrote:
> If those files are fairly small then I suggest you read them into
> something in one gulp.
>
> Any form of disk accesss is /very/ slow
>
> Personally I would read it into a String, then probably use a
> pre-created TStringStream

I thought about doing something like that. And I think that'd work well
if I knew the lengths of each value. And I'd have to open them up each
time to read them anyway, so I am not sure the disk access would really
be reduced that much.

What I have seems to work fine, but yesterday I was given 700+ of these
critters to import. It took a little over 30 seconds to process them
and build the query. Much better than my original routine, which took
close to 10 minutes. So I think we're fine. However this is a pilot
project, and the number of files could dramatically increase. But the
boss is happy and that's all I care about. :)

Thanks much to everyone who helped, I really appreciate it. Keeping my
ass out of the fire is always a worthy goal.

.