I am having problems with reading and writing binary data<BR>into a file. The code for it is below.<BR>This is the line with which I am having problems:<BR><BR>{ objStream.write ptobjXmlHttp.responsebody }<BR><BR>I am able to open the binary file, but when I try to read and write the binary data into another file, it does not write.<BR><BR>Do you know why this isn&#039;t working? <BR><BR><BR>&#060;%<BR> Response.Buffer = true<BR> Dim ptobjXmlHttp<BR> Dim imageHTML<BR> Dim pturl <BR> Dim graphichost<BR> imageHTML = ""<BR> <BR> &#039; URL FOR THE RETRIEVAL API LISTED HERE:<BR> &#039;dochost = "http://ccache.Test.com"<BR> graphichost = "http://graphics.Test.com"<BR> pturl = "/s/ewrap01/getdoc_api.cgi?"<BR><BR> For Each param in GetParams<BR> pturl = pturl&"picture=yes"&"&querydocid="&GetParams("quer ydocid")&"&dtype="&GetParams("dtype")&"&dinst="&Ge tParams("dinst")<BR> Next<BR> <BR> <BR> On Error Resume Next<BR> Set ptobjXmlHttp = Server.CreateObject("Msxml2.XMLHTTP")<BR> ptobjXmlHttp.open "GET", graphichost&pturl, False <BR> ptobjXmlHttp.send<BR> Response.ContentType "image/jpeg"<BR> <BR> &#039;Create a stream object<BR> Dim objStream<BR> Set objStream = Server.CreateObject("ADODB.Stream")<BR> <BR> &#039;Open a JPEG file<BR> objStream.Type = adTypeBinary<BR> objStream.Open<BR> Response.Write objstream.size<BR><BR>*(this is where I&#039;m having problems)<BR> objStream.write ptobjXmlHttp.responsebody <BR> <BR> &#039;Output the contents of the stream object<BR> Response.ContentType = "image/jpeg"<BR> Response.BinaryWrite objStream.responseBody<BR> <BR> Response.Write objstream.size<BR> <BR> objStream.SaveToFile "e:photolibpictureclock1111.jpg"<BR> Response.Write objstream.size<BR> &#039;Clean up....<BR> objStream.Close<BR> <BR> Set objStream = Nothing<BR> ptobjXmlHttp = Nothing<BR>%&#062;<BR>