home *** CD-ROM | disk | FTP | other *** search
/ Using Visual Basic 5 (Platinum Edition) / vb5.iso / Code / ch38 / picture.asp < prev    next >
Encoding:
Text File  |  1997-09-21  |  370 b   |  10 lines

  1. <%
  2. 'Create ADODB Object, Connect to Database and execute query
  3. Set conn = Server.CreateObject("ADODB.Connection")
  4. Conn.Open "DSN=EmployeeDB"
  5. SQL = "SELECT Employee.Picture FROM Employee "
  6. SQL = SQL & "Where Employee.ID=" & Request.QueryString("ID")
  7. Set RSPicture = Conn.Execute(SQL)
  8. Response.ContentType="image/JPEG"
  9. Response.BinaryWrite RSPicture("Picture")
  10. %>