G
Guest
I'm working in Visual Studio 2005 and C#.
I'm using the following code to turn a Word 2002 document into a blob. This
blob will be passed as a parameter to a stored procedure in an Oracle
database. The error I'm getting makes me think I'm not converting the entire
document. Anybody see anything obviously wrong with the code below?
Thanks,
Randy
byte[] blobDoc;
using (FileStream fs = new FileStream(_filenameSave, FileMode.Open,
FileAccess.Read))
{
BinaryReader br = new BinaryReader(fs, System.Text.Encoding.UTF8);
byte[] byteArray = new byte[fs.Length];
int length = Convert.ToInt32(fs.Length);
br.Read(byteArray, 0, length);
blobDoc = byteArray;
}
I'm using the following code to turn a Word 2002 document into a blob. This
blob will be passed as a parameter to a stored procedure in an Oracle
database. The error I'm getting makes me think I'm not converting the entire
document. Anybody see anything obviously wrong with the code below?
Thanks,
Randy
byte[] blobDoc;
using (FileStream fs = new FileStream(_filenameSave, FileMode.Open,
FileAccess.Read))
{
BinaryReader br = new BinaryReader(fs, System.Text.Encoding.UTF8);
byte[] byteArray = new byte[fs.Length];
int length = Convert.ToInt32(fs.Length);
br.Read(byteArray, 0, length);
blobDoc = byteArray;
}