I'm storing documents as BLOBs in an Access db and downloading them to users on demand after they log in. I use the following code to store the docs to my database:

Code:
	
var objStream = Server.CreateObject("ADODB.Stream");
with (objStream)
{
	Type = adTypeBinary;
	Open;
	LoadFromFile ( Server.MapPath(FileName) );
	rs( "Doc" ) = Read( adReadAll );
}
Works great!! But I don't understand why the following download code works:

Code:
with (objStream)
{
	Type = adTypeBinary;
	Open();
//      Write ( rs( "Doc" ).value );
	Response.ContentType = "application/pdf";
	Response.AddHeader ("Content-Disposition", "attachment; filename=\"" + FileName + "\"");
	Response.AddHeader ( "Content-Length", rs("Document").ActualSize );
//	Response.BinaryWrite ( Read(adRealAll) );
	Response.BinaryWrite ( rs("Doc").value );
It seems like the two statements I commented out should work, but the only way I could get the download to work (after 8 hrs of hair pulling), was to do the BinaryWrite directly from the db field object, and then, only if I'd created and opened an ADODB Stream first.

Can any of you ASP/DB gurus tell me what's going on here?

TIA

Clyde Ford