I want to store images via a file linkage in my access for my asp site.The thing is that I have the asp code in asp as shown below but it just won't retrieve from the access that I have.Do I need to do additional steps to make it work?
Code:
<html> <head> <title>Results Found</title> </head> <body> <h2>Results retrieved from Database</h2> <% set conn=Server.CreateObject("ADODB.Connection") conn.provider="Microsoft.Jet.OLEDB.4.0" conn.open "C:\Inetpub\wwwroot\Demo\data\demo.mdb" form1=Request.Form("form1") if form1="" then WHERE = " 1 = 1 " categories = Trim(Request("categories")) If categories <> "" Then WHERE = WHERE & " AND categories = '" & Replace(categories,"'","''") & "' " races = Trim(Request("races")) If races <> "" Then WHERE = WHERE & " AND races = '" & Replace(races,"'","''") & "' " occasion = Trim(Request("occasion")) If occasion <> "" Then WHERE = WHERE & " AND occasion = '" & Replace(occasion,"'","''") & "' " SQL = "SELECT * FROM tblGuestBook WHERE" & WHERE 'SQL="SELECT * FROM tblGuestBook" end if set rs=Server.CreateObject("ADODB.Recordset") rs.Open sql,conn %> <table border="1"> <tr> <%for each x in rs.Fields response.write("<td>" & x.name & "</td>") next%> </tr> <%do until rs.EOF%> <tr> [COLOR="Red"] <%for each x in rs.Fields%> <%if x.name="imej" then %> <td> <img src="inidan apparel/man cotton kurta/<% Response.Write(x.value)%>" width="100" height="100" > </td> <%else%> <td><%Response.Write(x.value)%></td> <%end if%>[/COLOR] <%next rs.MoveNext%> <%loop rs.close conn.close %> </table> </body> </html>
Comment