hello anybody can help me..to solve my problem...i m only read binary data (less than 32kb) from database ...can read more than 32kb?
using (AseConnection conn = new AseConnection(conngais.constring.Connection()))
{
conn.Open();
using (AseCommand cmd = conn.CreateCommand())
{
cmd.CommandText = "select f8446atifek from t8446x where f8446id_publish=@id";
cmd.Parameters.Add("@id", AseDbType.Integer).Value = Convert.ToInt64(id);
using (AseDataReader reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess))
{
if (reader.Read())
{
//reader.GetBytes(0, 0, (byte[])reader.GetValue(0), 0, 500);
//.GetBytes(0, startIndex, outbyte, 0, buffersize);
Byte[] pdfData = (byte[])reader.GetValue(0);
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition","attachment;filename=Tr.pdf");
Response.BinaryWrite(pdfData);
Response.End();
}
}
}
}