// Cast BLOB data using OracleBlob type
OracleBlob blob = (OracleBlob)cmd.Parameters["FILE_DATA"].Value;
// Create a byte array of the size of the Blob obtained
Byte[] filedata = new Byte[blob.Length];
// Read blob data into byte array
blob.Read(filedata,0,System.Convert.ToInt32(blob.Length));
return filedata;
|