Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2003, 02:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default image display problem please help

Hi all

Please guide how can display the image file which is save in ACCESS database.

$(ROOTDIR)\CONTRACT\CONTRACT-164.TIF


Response.Write("<tr>")
Response.Write("<a href=" & server.HTMLEncode(rs("imagename")) & " >" & rs("imagename") & "</a>")
Response.Write("</tr>")

Thanks for help.

regards.

Mateen Martin
[email protected]
 
Old June 4th, 2003, 03:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

If you saved image names only in the database you can simply display:

images_dir="images/" 'directory contains the images

Response.Write "<table>"
While Not rs.EOF
image_URL=images_dir & rs("imagename")
Response.Write "<tr>"
Response.Write "<td><img src=" & image_URL & "></td>"
Response.Write "</tr>"
rs.MoveNext
Wend
Response.Write "<table>"



...but the Soon is eclipsed by the Moon
 
Old June 7th, 2003, 01:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks four your response.
It is the probem that I save only image name but Orbit Front software save the image name at the access databse like this

$(ROOTDIR)/CONTRACT/IMAGENAME.TIF

I try you coding but it is not run.
I required happer link on the image file, and run the asp file on explorer.

Please correct my following asp coding.

<html>
<HEAD>
</HEAD>
<BODY>

<form method=post action=wpls.asp id=form name=form>
<%

set cn=server.CreateObject("adodb.connection")
cn.ConnectionString="Provider=SQLOLEDB.1;Integrate d Security=SSPI;Persist Security Info=False;Initial Catalog=dcil;Data Source=AUHTRIPSVR2"
cn.Open

contractno=Request.QueryString("contractno")
contractno=Request.Form("contractno")

recordid=Request.Form("recordid")


ssql="SELECT * FROM archive2 where contractno='" &contractno & "'"

'Record Set
set rs=cn.Execute(ssql)

%>
<TABLE border=1 bordercolorlight="#669999" bordercolordark="#330066">
<tr bgcolor=gold>
<th>Contract No</th>
<th>Record Drawing No</th>
<th>Drawing No</th>
<th>ImageReference</th>
</tr>

<%


do while rs=false then

Response.Write("<tr>")
Response.Write("<td bgcolor=lightyellow>" & rs("contractno") & "</td>")
Response.Write("<td>" & rs("recordno") & "</td>")
Response.Write("<td>" & rs("drawingno") & "</td>")

Response.Write("<td>")
Response.Write("<a href=" & server.URLEncode(rs("imagereference")) & ">" & rs("imagereference") & "</a>")
Response.Write("</td>")
Response.Write("<tr>")

rs.movenext
loop
%>

</TABLE>


<INPUT id=submit2 name=submit2 type=submit value="Back" target=Right>
</P>
</BODY>
</HTML>

</body>


regards.

Mateen Martin
[email protected]



Quote:
quote:Originally posted by NotNowJohn
 If you saved image names only in the database you can simply display:

images_dir="images/" 'directory contains the images

Response.Write "<table>"
While Not rs.EOF
image_URL=images_dir & rs("imagename")
Response.Write "<tr>"
Response.Write "<td><img src=" & image_URL & "></td>"
Response.Write "</tr>"
rs.MoveNext
Wend
Response.Write "<table>"



...but the Soon is eclipsed by the Moon





Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Display problem ratheesh_param ASP.NET 1.0 and 1.1 Professional 2 November 27th, 2006 01:02 AM
Image Display Problem ratheesh_param ASP.NET 2.0 Professional 0 November 22nd, 2006 03:24 AM
Image Display Problem ratheesh_param ASP.NET 1.x and 2.0 Application Design 0 November 22nd, 2006 03:02 AM
image display problem please help mateenmohd Classic ASP Basics 0 June 7th, 2003 02:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.