<% ' ------------ open database or use if already open -------------- If IsObject(Session("yhdb_conn")) Then Set conn = Session("yhdb_conn") Else Set conn = Server.CreateObject("ADODB.Connection") conn.open "yhdb","","" Set Session("yhdb_conn") = conn End If artnum = Request.QueryString("artnum") ' ------------ select sql -------------- if artnum <> "" then sql = "SELECT * FROM [artwork_table] WHERE [number] = " & cstr(artnum) Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, conn, 3, 3 ' ------------ make html --------------%>

Yellowhorse Artwork Detail
Artwork Id: <%=cstr(rs.Fields("number").Value)%>
.jpeg">
<%=rs.Fields("description").Value%> <%if rs.Fields("artisturl").value <> "" then%> | ">Artist Information <%end if%>
<%if rs.Fields("size") <> "n.a." then%> Size: <%=rs.fields("size").value%> <%end if%>
<%if rs.Fields("price") <> 0 then%> price: $<%=rs.Fields("price").Value%>

<%else%> Not For Sale

<%end if%>
<%else%>

Detail Lookup Error
Yellowhorse Home

<%end if%> <% ' response.write "
" ' response.write "Purchase Online | " ' response.write "" ' response.write "" ' response.write "" ' response.write "Print and Fax/Mail Order" ' response.write "" %>