怎么把exe文件放入数据库,读出来在转换为exe文件,请各位大侠指教!!多谢了

解决方案 »

  1.   

    system.io.file.readallbytes exe
    to db
    from db
    system.io.file.writeallbytes exe
      

  2.   

    exe转二进制流保存到数据库
    byte[] hash; using (Stream stream = File.OpenRead(filename)) 
    {     
    hash = SHA1.Create().ComputeHash(stream); 

    string base64Hash = Convert.ToBase64String(hash); byte[] bytes = System.IO.File.ReadAllBytes("c:\\path\\filename");
    System.IO.File.WriteAllBytes("c:\\path\\filename", bytes);