G
Guest
I am trying to extract a zip file in a database image field to disk. For some
reason, the zip file is getting corrupted / truncated. I have code in ASP
which extracts the zip file no problem, so i know it is not corrupted in the
table. Any help would be appreciated.
FileStream fs = new FileStream(sFilePath + "TestFile.zip",
FileMode.CreateNew);
BinaryWriter bw = new BinaryWriter(fs);
byte[] buffer =
Encoding.ASCII.GetBytes(DataReader[sField].ToString());
bw.Write(buffer);
bw.Close();
fs.Close();
reason, the zip file is getting corrupted / truncated. I have code in ASP
which extracts the zip file no problem, so i know it is not corrupted in the
table. Any help would be appreciated.
FileStream fs = new FileStream(sFilePath + "TestFile.zip",
FileMode.CreateNew);
BinaryWriter bw = new BinaryWriter(fs);
byte[] buffer =
Encoding.ASCII.GetBytes(DataReader[sField].ToString());
bw.Write(buffer);
bw.Close();
fs.Close();