Stream Binary Demo


To see the following ASP code run, visit: /demos/binShow.asp

  'Create a stream object
  Dim objStream
  Set objStream = Server.CreateObject("ADODB.Stream")
  
  'Open a GIF file
  objStream.Type = adTypeBinary
  objStream.Open
  objStream.LoadFromFile Server.MapPath("/images/banner/dimacbanner1.gif")
  
  'Output the contents of the stream object
  Response.ContentType = "image/gif"
  Response.BinaryWrite objStream.Read
  
  'Clean up....
  objStream.Close
  Set objStream = Nothing


[Return to the Article]
[Run the Stream Text Demo]
[Visit binShow.asp]