Home
DBPix
Download
Order
Testimonials
Support
Tutorials
Samples
KnowledgeBase
Links
Revision History
Documentation
Search
Contact
Site Map

Graph: DBPix image storage vs OLE Embedding and Linking in Microsoft Access


DBPix Sample Source Code: item_detail.asp
Back to sample
<%@ LANGUAGE = VBScript %> 
<%  Option Explicit %>
<% 
	Response.Expires = -1			' Ensure that the client-browser doesn't cache 
%>
<html><head><title>ASP Image Database Samples - Remote Editing with XMLHTTP</title>
<!--#include file="adovbs.inc" --><!-- *** VBScipt constants *** -->
<!--#include file="config.inc" --><!-- *** App specifig configuration, connect strings, database locations/DSN's etc *** -->
<!--#include file="common.inc" --><!-- *** common code (eg photo border) *** -->
</head>
<body topmargin="10" leftmargin="0">
<center>
<p align="center"><font face="Arial" size="4" color="#003366"><strong><u>ASP Image Database Samples - Remote Editing with XMLHTTP</u></strong></font></p>
<p align="center"><font face="Arial" size="2" color="#003366"><strong><a href="readme.htm">Documentation</a> &nbsp; <a href="http://www.ammara.com/">DBPix Site</a><strong></font></p>
<table border="0" cellpadding="0" cellspacing="0" width="600">
  <tr>
    <td align="center"><hr size=1><br>
<%
	Dim ItemId
	ItemId = Request("itemid")

	If (ItemId <> "") Then 
		Dim cn
		Dim rs
		Set cn = Server.CreateObject("ADODB.Connection")
		Set rs = Server.CreateObject("ADODB.Recordset")
		cn.Open GetConnectString
		Dim SQL
		SQL = "SELECT * " &_
		      "FROM tItems " &_
		      "WHERE Id = " & ItemId

		rs.Open SQL, cn, adOpenStatic, adLockReadOnly, adCmdText

		if not rs.EOF then
			Response.Write StartImageBorder
%>
<p align="center"><img src="getimage.asp?query=1&itemid=<%=ItemId%>&version=<%=rs("ImageVersion")%>" width="<%=rs("ImgWidth")%>" height="<%=rs("ImgHeight")%>" alt="Image (<%=rs("ImgSize")%> bytes)"><%=FinishImageBorder%>
</p>
<hr size=1>
      <p align=left><font face="Arial" color="#003366" size="2"><strong>Title:</strong></font><br>
      <font face="Arial" size="2"><%=rs("Title")%></font></p>
      <p align=left><font face="Arial" color="#003366" size="2"><strong>Description:</strong></font><br>
      <font face="Arial" size="2"><%=rs("Description")%></font></p>
<hr size=1>
<%
		end if 'rs.EOF
		rs.Close
		Set rs = Nothing
	end if 'm_sSourceID <> ""
%><p>&nbsp;</p>
		</td>
  </tr>
</table>
</center>
</body>
</html>

Back to sample