Read Binary File data?

  • Thread starter Thread starter Ben Wallace \(3\)
  • Start date Start date
B

Ben Wallace \(3\)

Can anyone point me in the right direction as to how can I read and
interpret a binary files data. I need to read the file and then import it's
data into SQL server. I know the structure of my binary file but am unsure
how to get into SQL server, any advice is appreciated.

Thanks.
 
Thanks Lloyd,
But I'm not sure not how it's accomplished with these options....your
thoughts.
 
Use a StreamReader to put the file contents into a byte array of the
appropriate dimension. Then assign the byte array to the value of a
SqlDbType.Image field.
 
Brad Roberts said:
Use a StreamReader to put the file contents into a byte array of the
appropriate dimension. Then assign the byte array to the value of a
SqlDbType.Image field.

I'm hoping that StreamReader was a typo for Stream there :)

In particular, if it's binary data you *don't* want to use a
StreamReader, which is specifically there to convert binary data into
*text* data.
 
Back
Top