% dim conn 'database connection object dim rs 'recordset dim id dim credit dim caption id = Request("id") 'create the connection object set conn = Server.CreateObject("ADODB.Connection") 'open the connection conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\home\hnt7c211\legacy\iha3skj42as9dh.mdb;" Set rs = Server.CreateObject("adodb.recordset") SQL = "SELECT credit, caption FROM Images WHERE id=" & id 'set rs properties rs.LockType = adLockReadOnly rs.Open SQL, conn credit = rs.Fields("credit") caption = rs.Fields("caption") rs.Close %>
Photo by <%=credit%> |
<%=caption%> |