<% Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType = "image/gif"
Set conn = Server.CreateObject("ADODB.Connection") conn.Open "(your connection string)"
Set rs = conn.Execute("SELECT emp_photo FROM emps WHERE emp_id =1") '
Response.BinaryWrite rs("emp_photo")
Response.End %>
i have code similar to this and it works fine as long as the emp_id in the emps table actually has a photo. How can I display a message "no photo on file" or something like that when i encounter a missing photo?
thanks in advance
Response.Buffer = TRUE
Response.Clear
Response.ContentType = "image/gif"
Set conn = Server.CreateObject("ADODB.Connection") conn.Open "(your connection string)"
Set rs = conn.Execute("SELECT emp_photo FROM emps WHERE emp_id =1") '
Response.BinaryWrite rs("emp_photo")
Response.End %>
i have code similar to this and it works fine as long as the emp_id in the emps table actually has a photo. How can I display a message "no photo on file" or something like that when i encounter a missing photo?
thanks in advance