You can do something similar to the following pseudo code
while (sqlReader.GetBytes(params))//params is a placeholder for the actual arguments and
//will have a byte array buffer and some counter indexes
{
context.Response.BinaryWrite(buffer);
//somecounter
}
SqlDataReader http://msdn.microsoft.com/en-in/library/system.data.sqlclient.sqldatareader.aspx