Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Link Pic From Network Path

Posted on 2007-04-02
10
Medium Priority
?
196 Views
Last Modified: 2010-04-25
The db we are pulling from stores only network paths for pictures. Is it possible to display a picture on the page from a network path? How?
0
Comment
Question by:adraughn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 18838137
Hi adraughn,

Display them where?  If the network path exists locally and not on the web server, you cannot display the pics by using that path.  You would need to provide some additional scripting to translate the path to the correct web server path.

In order to better answer this we need more information on how your site is set up and what the various paths are.
0
 
LVL 13

Author Comment

by:adraughn
ID: 18838231
the pictures need to be displayed on the report. i am the programmer that setup the db. i am attempting to help the web guys on resolving this issue.

i created a view that they access to pull in records for the report that they display on the page. they are currently using strSQL = my sql statement to pull in data. i need them to show the pictures for the report as well, BUT i store network paths, not the pictures in the table.

In my front end app, i just create a frame on the form/report and use this code:

Me![ImageFrame_1].Picture = Me![ImagePath_1]

to show the picture from the network path. Is it possible to do something similar in a dreamweaver report?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 18838299
Dreamweaver produces web pages, not reports.  I'm not at all sure what you are trying to do here...
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 13

Author Comment

by:adraughn
ID: 18838347
it is a page that is created. they bring in the data via my sql statements and create tables to view the data on the page. here is some code from one of our other reports:
(in this case cnum is the textbox on the page where the user enters the job number or order number.

<%Option Explicit%>
<!--#include file="adovbs.inc"-->
<!--#include file="Connect.asp"-->
<%

 
 Dim objConn
 Dim rs
 
 Dim strRes
 Dim strSQL

 if request.form("cnum")<>"" then

      
                  strSQL = "SELECT * FROM vwWEB WHERE JobLogID = " & request.form("cnum")
                  

 else
      
                  strSQL = "SELECT * FROM vwWEB WHERE JobLogID = 0"
 end if

 Set objConn = Server.CreateObject("ADODB.Connection")
 Set rs = Server.CreateObject("ADODB.Recordset")

 objConn.Open strConnect
 
 rs.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly, adCmdText
 
 strRes = "<table border=""0"" width=""400"">"
 
 Do While Not rs.EOF
 strRes = strRes & "<td>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("JobLogID") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("Customer") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("SpindleType") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("ContactDt") & "</tr><br><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("OrderType") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("MachineSN") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("Status") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("ShipDt") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("ReturnDescrip") & "</tr><br><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("ShipVia") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("TrackingNum") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("FinishedDt") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("PromisDt") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("RecdDt") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("CoreDt") & "</tr><br>"
 strRes = strRes & "<tr><font face=""sans-serif"">" & rs("PromiseDt") & "</tr><br>"
 strRes = strRes & "</td>"
       rs.MoveNext
 
 Loop
 strRes = strRes & "</table>"      
 
 rs.Close
 objConn.Close
 
 Set rs = Nothing
 Set objConn = Nothing


%>
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 18838450
What does an image path look like in the DB?

Also, the table code above is screwed up.  There is an opening table tag, then a td tag, THEN a tr tag.  That isn't good.

The loop lines should all look like this:

strRes = strRes & "<tr><td><font face=""sans-serif"">" & rs("JobLogID") & "</td></tr>"

Lose the <td> and </td> lines at the very top and bottom.

 
0
 
LVL 13

Author Comment

by:adraughn
ID: 18838554
that wasn't actually the code we finished with. it was some that they sent me during development.

in the db, it looks like this:
\\MyServer\Optimum\Spindle\Spindle_DataBase\Pictures\Linked Pictures\raZweig_1.jpg
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 18838629
Do the pictures reside on the web server?  What's the path there?  

My guess is you will have to code a translation from the above path to the correct server path.  Ask your web guys what the correct image path will be.
0
 
LVL 13

Author Comment

by:adraughn
ID: 18838747
the pictures are not on the web server and my table is updated constantly by users adding reports with pictures. Suggestions?

\\MyServer\Teardown

is the path where all of the pictures should go if theya re to reside on the web server.

thanks for your help,

adria
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 2000 total points
ID: 18838787
>> Suggestions?

Well, the photos need to be uploaded to the server if this is at all going to work.  I would create a batch file to copy the \\MyServer\Optimum\Spindle\Spindle_DataBase\Pictures\Linked Pictures\ to \\MyServer\Teardown every so often.

You need to know the correct image src tag structure for the web.  Assuming \Teardown is the site root, the correct call would be:

<img src="raZweig_1.jpg">

So you need to write some code that removes \\MyServer\Optimum\Spindle\Spindle_DataBase\Pictures\Linked Pictures\ from the path after the DB returns it.

Better yet, don't store the whole path...just the image file name.

0
 
LVL 13

Author Comment

by:adraughn
ID: 18838840
i can do that with a sql sp and pull it into the view. so if i do that and create a bat to copy the pics over a few times a day, he will be able to pull the pictures in. (you're my hero)

Keep the lookout for more points, I am sure that my web guys are going to have questions.

thanks again.

adria
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question