How to save binary file

Results 1 to 2 of 2

Thread: How to save binary file

  1. #1
    Join Date
    Dec 1969

    Default How to save binary file

    Hi,<BR><BR>I use this code to get a graphic on a server at another location and display graphic on the screen. How can I take the binary data and save to file?<BR><BR>response.buffer = true<BR>Dim strThumbNail, objHTTP<BR>strThumbNail = "" & nProductId.Value & ".jpg"<BR>Response.ContentType = "image/jpeg"<BR>Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")<BR > "GET", strThumbNail, false<BR>objHTTP.send<BR>Response.BinaryWrite objHTTP.ResponseBody<BR>Set objHTTP = Nothing<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Use an ADODB.Stream object;s capable of grabbing a binary stream and then saving it to a file. Read the docs on ADODB.Stream on MSDN.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts