hi to alli am trying to write binary data to a word file.
my data is in a byte array which has been fetch from database with field type as image. I want to see it English.. I've tried many other options but basic problem is that i want something in the filestrem so that it will write binary data into word file in doc format....plz help me ASAP it's argent....
I am writing the code of the function..
PublicFunction writeFileData(ByVal strFilePath AsString, _
ByVal bytFileData() AsByte)
Try
'To write the file data
Dim fs As FileStream
'To write binary data
Dim bw As BinaryWriter
fs = New FileStream(strFilePath, FileMode.Create, FileAccess.Write)
bw = New BinaryWriter(fs)
bw.Write(bytFileData)
bw.Flush()
'close the output file
bw.Close()
fs.Close()
Catch ex As IOException
Throw ex
EndTry
my data is in a byte array which has been fetch from database with field type as image. I want to see it English.. I've tried many other options but basic problem is that i want something in the filestrem so that it will write binary data into word file in doc format....plz help me ASAP it's argent....
I am writing the code of the function..
PublicFunction writeFileData(ByVal strFilePath AsString, _
ByVal bytFileData() AsByte)
Try
'To write the file data
Dim fs As FileStream
'To write binary data
Dim bw As BinaryWriter
fs = New FileStream(strFilePath, FileMode.Create, FileAccess.Write)
bw = New BinaryWriter(fs)
bw.Write(bytFileData)
bw.Flush()
'close the output file
bw.Close()
fs.Close()
Catch ex As IOException
Throw ex
EndTry
Last edited: