protectedvoid Page_Load(object sender, EventArgs e)
int i;
for (i = 51; i <= 5000; i++)
{
//Mostramos la ImagenFile por pantalla
string sql = "Select foto From FOTOEMPLEADO Where noEMPLEADO="+ i + "";
FbConnection SqlConn = newFbConnection(FbDB);
FbCommand SqlCom = newFbCommand(sql, SqlConn);
SqlConn.Open();
byte[] byteImage = (byte[])SqlCom.ExecuteScalar();
SqlConn.Close();
if (byteImage != null)
{
Response.ContentType = "image/jpeg";
Response.Expires = 0;
Response.Buffer = true;
File.WriteAllBytes(@"c:\fotos\" + i + ".jpg", byteImage);
Response.Clear();
Response.BinaryWrite(byteImage);
Response.End();
}
}
}