Hi, I have just created a database and plan to store images in it using an 'ole object' data type. I can store images in it but it is then accessing using asp I can't seem to get working. I can do normal queries to display text and numbers from the database, and have included one, but how/what would I need to change to display an image from the field image. How would I get it to display a specific image from a session variable.
The query I have copied and pasted here is for one to list the name of all the images, so everything is how I would have it connected to the database.
Any help would be really helpful.
Thank You
Crazy Dino
<%
Dim adoCon 'Database Connection Variable
Dim strCon 'Holds the Database driver and the path and name of the database
Dim strAccessDB 'Holds the Access Database Name
Dim strSQL 'Database query sring
strAccessDB = "datastore"
Set adoCon = Server.CreateObject("ADODB.Connection")
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=; DBQ=" & Server.MapPath(strAccessDB)
adoCon.Open strCon
'Database Query"
set rsimage=Server.CreateObject("ADODB.recordset")
sql="SELECT imagename FROM images"
sql=sql
rsimage.Open sql, adoCon
'response.write(sql)
Do While Not rsimage.eof
response.write(rsimage("imagename"))
response.write("</br>")
rsimage.movenext
loop
%>