Converting an OLE Image Object from MS Access for use in .NET

后端 未结 5 1249
清歌不尽
清歌不尽 2020-12-20 18:06

I\'m working on redeveloping an Access based system into c#.net, however when MS went from office 2003 to office 2007 they removed the picture editor within access - which m

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-20 19:00

    In my case the following function worked. The data are stored by a VB6 application.

    public static byte[] ConvertOleBytesToRawBytes(byte[] oleBytes)
    {
       // The default encoding is in my case - Western European (Windows), Code Page 1252
       return Encoding.Convert(Encoding.Unicode, Encoding.Default, (byte[])oleBytes);
    }
    

提交回复
热议问题