triggermorf
New member
I am trying to display images from an access database using ASP classic. The image file paths are stored in the database in a text field e.g. images/images1.jpg. The images themselves are stored in a folder named images in the same folder as the database. When I run the script only the image captions are displaying and not the images themselves. I am very new to ASP and can't work out what the problem is my code is below.
<%@ Language=VBScript %>
<%
set conx=server.CreateObject("adodb.connection")
conx.Provider="Microsoft.JET.OLEDB.4.0"
conx.Open Server.Mappath("database/database.mdb")
set imageRs=server.CreateObject("adodb.recordset")
imageRs.Open "Select * FROM image",conx, adOpenkeyset, AdLockOptimistic
%>
<html>
<body>
<table>
<%Do While Not imageRs.EOF%>
<tr>
<td>
<img src="<%=imageRs("image_link") & "*"%>">
</td>
<td>
<%=imageRs("image_cap") & "*"%>
</td>
</tr>
<%
imageRs.MoveNext
Loop%>
</table>
<%
imageRs.close
set imageRs=nothing
set conx=nothing
%>
</body>
</html>
Any help would be great
<%@ Language=VBScript %>
<%
set conx=server.CreateObject("adodb.connection")
conx.Provider="Microsoft.JET.OLEDB.4.0"
conx.Open Server.Mappath("database/database.mdb")
set imageRs=server.CreateObject("adodb.recordset")
imageRs.Open "Select * FROM image",conx, adOpenkeyset, AdLockOptimistic
%>
<html>
<body>
<table>
<%Do While Not imageRs.EOF%>
<tr>
<td>
<img src="<%=imageRs("image_link") & "*"%>">
</td>
<td>
<%=imageRs("image_cap") & "*"%>
</td>
</tr>
<%
imageRs.MoveNext
Loop%>
</table>
<%
imageRs.close
set imageRs=nothing
set conx=nothing
%>
</body>
</html>
Any help would be great
