Link Pic From Network Path

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?
LVL 13
adraughnAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineNo oneCommented:
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
adraughnAuthor Commented:
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
Jason C. LevineNo oneCommented:
Dreamweaver produces web pages, not reports.  I'm not at all sure what you are trying to do here...
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

adraughnAuthor Commented:
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
Jason C. LevineNo oneCommented:
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
adraughnAuthor Commented:
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
Jason C. LevineNo oneCommented:
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
adraughnAuthor Commented:
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
Jason C. LevineNo oneCommented:
>> 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
adraughnAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.