I have a number of images that I want to link to an Access database. I do
not want to embed them into as there are too many and the database will be
too large in size! I have added a path to where the images reside in the
releveant field e.g images\picture1.jpg.
Using UltraDev I have created a recordset to display the contents of the
database table onto the web page but would also like to retrieve the image
that the path in the database's table relates to.
Can anyonE tell me how do I do this???
Thanks!
Hi there
The solution you are looking for is the next.
Dim Cn
Dim Rs
Set Cn = Server.CreateObject("AdoDB.Connection")
Cn.Open ConnectionString...
Set Rs = Server.CreateObject("AdoDB.Recordset")
Rs.Open "Select * from Images" , Cn
If Rs.EOF or Rs.BOF then
Response.write "End of File"
else
Rs.MoveFirst
While not Rs.EOF
Response.write RS.Fields("Name") & "<img src=" & Rs.Fields("Path")&_
">"
Rs.MoveNext
wend
end if
Set Rs = nothing
Set Cn = nothing
I hope this will help
Regards
Auratius