You are currently browsing the tag archive for the 'Display Image' tag.

Display an Image in a SQL Database

second option :

in file test.html, put this code :-

<img src=”image.asp?id=1″>

then, in same directory, make file image.asp
and put this code :-

<%
Response.ContentType = “image/gif” 

Response.Expires = 0
Response.Buffer = TRUE
Response.Clear

id = Request.QueryString(“id”)

`checking the data exist or not
`Server Name=test
`SQL Server database name=test

cme = “DRIVER={SQL SERVER};SERVER=test;UID=sa;pwd=;DATABASE=test”

`field ImageItem is image datatype in SQL Server.
cmdsql = “SELECT ImageItem from EQUIPMENT WHERE id =`”&id&”`”
set rs = Server.CreateObject(“adodb.Recordset”)
rs.open cmdsql, cme

Response.BinaryWrite rs(“ImageItem”)
Response.End 
%>

FOUND AT: http://www.codetoad.com/forum/16_9829.asp

Pages

 

November 2009
M T W T F S S
« Oct    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

RSS Example RSS Real Estate Feed

  • An error has occurred; the feed is probably down. Try again later.