我将word文档内容 存入到
oracle数据库中的一个blob字段
我现在将这个字段查询出来放到了 datatable中.然后创建一个新的word 将blob字段的信息放到word里面..
现在问题是 取出的时候 是乱码...
求大虾帮助这是存入代码
FileStream fs = new FileStream(DocFilePath + "\\SaveTemp\\WordTemp.doc", FileMode.Open, FileAccess.Read);
byte[] buffurTemp = new byte[fs.Length];
fs.Read(buffurTemp, 0, (int)fs.Length);
Dda.Doc_Insert(_visitArgs.MedicalExamId, buffurTemp);
这是取出代码 byte[] buffur = System.Text.Encoding.Unicode.GetBytes(_dt.Rows[0][3].ToString());
File.WriteAllBytes(DocFilePath + "\\OpenTemp\\WordTemp.doc", buffur);
oracle数据库中的一个blob字段
我现在将这个字段查询出来放到了 datatable中.然后创建一个新的word 将blob字段的信息放到word里面..
现在问题是 取出的时候 是乱码...
求大虾帮助这是存入代码
FileStream fs = new FileStream(DocFilePath + "\\SaveTemp\\WordTemp.doc", FileMode.Open, FileAccess.Read);
byte[] buffurTemp = new byte[fs.Length];
fs.Read(buffurTemp, 0, (int)fs.Length);
Dda.Doc_Insert(_visitArgs.MedicalExamId, buffurTemp);
这是取出代码 byte[] buffur = System.Text.Encoding.Unicode.GetBytes(_dt.Rows[0][3].ToString());
File.WriteAllBytes(DocFilePath + "\\OpenTemp\\WordTemp.doc", buffur);
分享一下解决办法