Hi
The following is supposed to display an image but just returns 'True' instead. Any ideas?
TIA
The following is supposed to display an image but just returns 'True' instead. Any ideas?
TIA
Code:
<%
option explicit
dim useraction
dim dsn,sql,conn,rs,flag,color,x
dim fname,lname,tel,mobile,init,dept,id,picture
id=request("id")
useraction=request("action")
dsn="DBQ=" & Server.Mappath("../db/phdb.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
set conn=server.createObject("adodb.connection")
conn.open dsn
select case useraction
case "display"
sql = "select * from users where id="&id
set rs = conn.execute(sql)
lname=rs("lname")
fname=rs("fname")
tel=rs("tel")
mobile=rs("mobile")
init=rs("init")
dept=rs("dept")
picture=rs("picture")
if rs.eof and rs.bof then
response.write "No Record Found"
else
response.write "<table border=0 align=left><th align=left>Last Name</th><th align=left>First Name</TH>"
response.write "<th align=left>Tel</TH>"
response.write "<th align=left>Picture</TH>"
do while not rs.eof
if flag=0 then
flag=1
color="#DFEFFD"
else
flag=0
color="#DDEOE3"
end if
response.write "<TR bgcolor="& color & "><TD>"
response.write RS("lname") & "</td><td>" & RS("fname") & "</td><td>"
response.write RS("tel") & "</td><td>"
response.write ("<img src=""" & RS("picture") & "">"")
rs.movenext
x=x+1
loop
'response.write "<tr><td colspan=7>Total Records : " & x & "</table>"
rs.close
conn.close
set conn=nothing
end if
set conn = nothing
%>
<%end select%>