Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Microsoft Word document in Long raw column

Microsoft Word document in Long raw column

From: waxabi <waxabi_at_excite.com>
Date: 4 Jan 2005 14:12:46 -0800
Message-ID: <1104876766.160632.136460@f14g2000cwb.googlegroups.com>


A third-party application for which I do not have the source code for stores a Microsoft Word document in an Oracle 9 database in a LONG RAW column. When I select the document out of the database I get the correct number of bytes but they are not the correct charaters. It is not a usable stream. I do not know if the data is encrypted or if I just have a encoding issue. Here's the details

Oracle server is Linux
Oracle version is 9.02
Client is Windows

Using C#/ODP.NET I am using the following method to extract the data:

FileStream fs = new FileStream (
"c:\\test123.doc",FileMode.OpenOrCreate); BinaryWriter bw = new BinaryWriter(fs);
OracleBinary longRaw = null;
string SqlStmt = new StringBuilder(Select ......)...ToString();

OracleCommand cmd = new OracleCommand(SqlStmt,OraConx); OracleDataReader dr = cmd.ExecuteReader(); longRaw = dr.GetOracleBinary(..long raw ordinal...);

bw.Write(longRaw.Value);
bw.Flush();
bw.Close();
fs.Close();

I get similar (scrambled) results if I use the "export blob" function in TOAD. Does this look like some sort of encoding issue or does this look correct (meaning the document is probably encrypted). I am stuck, any suggestions appreciated.

Thanks, Wes Received on Tue Jan 04 2005 - 16:12:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US