Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/08/2011, 04:26
cricrina19
 
Fecha de Ingreso: agosto-2011
Mensajes: 14
Antigüedad: 12 años, 9 meses
Puntos: 4
Respuesta: Guardar un archivo .rar o .zip en BD

Ya me autorespondo yo....

Por si a alguien le interesa lo hice con esta funcion....

public static byte[] ConvertirFileToByteArray(string ruta)
{

FileStream fs = new FileStream(ruta, FileMode.Open, FileAccess.Read);
/*Create a byte array of file stream length*/
byte[] b = new byte[fs.Length];
/*Read block of bytes from stream into the byte array*/
fs.Read(b, 0, System.Convert.ToInt32(fs.Length));
/*Close the File Stream*/
fs.Close();

return b;
}