Importing file data

  • Thread starter Thread starter Tim Gains
  • Start date Start date
T

Tim Gains

can someone instruct me as to how to load a binary file and the import it's
data (rows pf data) into a database? Do I need to convert the binary file in
any way in order to decipher it's data. Any help is great help.

Thanks.
 
Tim said:
can someone instruct me as to how to load a binary file and the import it's
data (rows pf data) into a database? Do I need to convert the binary file in
any way in order to decipher it's data. Any help is great help.

Thanks.
With binary files you need to know the data type (long, int, double,
etc)of each element in the file.

Then
dim d as double
dim i as integer
dim i15 as int16
iFNum = FreeFile() ' Determine file number.
FileOpen(iFNum, sFname, OpenMode.Input)
fileget(ifnum,i) 'to get a 32 bit integer

and so on.

Strings are a hassle, you need to do the get into a string of the same
length as in the file.

With VB5 you needed to know the length of the file as eof did not work,
have not tried that with vb.net.

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top