OutFront Forums
     Home    Register     Search      Help      Login    

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

 

How do you link a image from a SQL

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> How do you link a image from a SQL
Page: [1]
 
 
Lookup13

 

Posts: 25
Joined: 8/25/2003
Status: offline

 
How do you link a image from a SQL - 5/7/2009 14:32:48   
I am using Expression , I have a simple datebase
SQL called Iventory
I created webpage and link up to data base
all data comes up fine ..
I have a image of each product in the Image file folder in the date base I gave complete address to it.
Ex: www.xxxx.com/images

I selected Image file to pulled data from ...

How do I make it link up on the webpage ?

TexasWebDevelopers

 

Posts: 761
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: How do you link a image from a SQL - 5/7/2009 15:11:46   
Call the path into the code to display an image:
Assuming ASP:
<img src="<%=rs("imagepath")%>" alt="">

_____________________________

:)

Follow us on TWITTER

(in reply to Lookup13)
Lookup13

 

Posts: 25
Joined: 8/25/2003
Status: offline

 
RE: How do you link a image from a SQL - 5/8/2009 9:01:35   
That didnt work...

Lets start over have a database called Inventory
Use Expression Web(new Front page) created ASPX
Page.

Next I selected dataview and connectted with Inventory sql all is good , all columns come up on preview.
Except Images and it displays a red X.

In sql in Images E:\ images\picture.jpeg (link to folder is this right?

What should the settings be in Data View image?

(in reply to Lookup13)
Giomanach

 

Posts: 6190
Joined: 11/19/2003
From: England
Status: offline

 
RE: How do you link a image from a SQL - 5/8/2009 10:44:46   
You want to run the SQL statement to link to the web rather than a drive. Or just get it to pull the image name from the database, so your links look like so:

<img src="images/<% =rs("imagepath") %>" alt="" />

Being a windows environment, you will be telling the server to look on the HDD title E: and then in the images directory rather than looking in the web folders.

< Message edited by Giomanach -- 5/8/2009 10:50:38 >


_____________________________




(in reply to Lookup13)
Lookup13

 

Posts: 25
Joined: 8/25/2003
Status: offline

 
RE: How do you link a image from a SQL - 5/8/2009 15:49:35   
I enter this in Image in SQL

<img src="images/<% =rs("www.abc.com\images\123456.jpeg") %>" alt="" />

I still get Red X

I guess I am really missing it ?!!

(in reply to Giomanach)
Tailslide

 

Posts: 6749
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: How do you link a image from a SQL - 5/8/2009 15:57:24   
The slashes are the wrong way around.

_____________________________

Little Blue Plane Web Design | Land Rover project

:)

(in reply to Lookup13)
Lookup13

 

Posts: 25
Joined: 8/25/2003
Status: offline

 
RE: How do you link a image from a SQL - 5/8/2009 16:06:43   
Change slashes around still no luck ?

<img src="images/<% =rs("www.abc.com/images/123456.jpeg") %>" alt="" />

(in reply to Tailslide)
Tailslide

 

Posts: 6749
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: How do you link a image from a SQL - 5/8/2009 16:21:24   
How about:

<img src="http://<% =rs("www.abc.com/images/123456.jpeg") %>" alt="" />

or


<img src="<% =rs("/images/123456.jpeg") %>" alt="" />

_____________________________

Little Blue Plane Web Design | Land Rover project

:)

(in reply to Lookup13)
Lookup13

 

Posts: 25
Joined: 8/25/2003
Status: offline

 
RE: How do you link a image from a SQL - 5/8/2009 16:45:16   
quote:

How about:

<img src="http://<% =rs("www.abc.com/images/123456.jpeg") %>" alt="" />

or


<img src="<% =rs("/images/123456.jpeg") %>" alt="" />

_____________________________

Little Blue Plane Web Design | Land Rover project



I tried it both ways no luck just shows :
How about:

<img src="http://<% =rs("www.abc.com/images/123456.jpeg") %>" alt="" />

or


<img src="<% =rs("/images/123456.jpeg") %>" alt="" />

____________________________

What am I doing wrong ?


(in reply to Tailslide)
Lookup13

 

Posts: 25
Joined: 8/25/2003
Status: offline

 
RE: How do you link a image from a SQL - 5/8/2009 18:56:36   
I loade the site to a server ,
Same results

I loaded the <img src="<% =rs("/image/123456.jpeg") %>" alt="" /> in the SQL file under image , for each product
is this correct ?

Then on webpage , on image click edit and used imagelinkfield and select the sql column image

So far is this correct ?

www.fixedpoint.com/test.aspx


(in reply to Lookup13)
Spooky

 

Posts: 26720
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: How do you link a image from a SQL - 5/8/2009 23:55:59   
All you need in the database record is the path to the file :

/image/123456.jpeg

DONT enter the code given above!

Then in the page itself, you will wrap the database code in a standard html <img> tag

<img src="<% =rs("ImageField") %>" alt="" />

At the moment you have just this code showing :

<img src="" style="border-width:0px;" />

What is written to the page when you treat the database column as plain text output? What is the code you use to write that text?




_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

Sp:)ky


(in reply to Lookup13)
Lookup13

 

Posts: 25
Joined: 8/25/2003
Status: offline

 
RE: How do you link a image from a SQL - 5/10/2009 14:23:27   
What is written to the page when you treat the database column as plain text output?

Output is Images/33445.jpeg

What is the code you use to write that text?

Experssion ASPX Data connection SQL
Select All from Inventory

<img src="<% =rs("ImageField") %>" alt="" />

I tried enter the code aspx doesnt like it

I inserted a reg picture then , cut code out and pasted
this in its place , no luck ....




(in reply to Lookup13)
Spooky

 

Posts: 26720
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: How do you link a image from a SQL - 5/11/2009 1:14:59   
Im not sure how flexible the expression is, but what do you see when you go to CODE view for that part of the page within expression?

thats the part we need to see.

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

Sp:)ky


(in reply to Lookup13)
Lookup13

 

Posts: 25
Joined: 8/25/2003
Status: offline

 
RE: How do you link a image from a SQL - 5/11/2009 14:08:13   
Spooky , you fixed it ?!
I chang a few things and I guessed it fixed it self over night ?!!

Thanks for you help ,


(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> How do you link a image from a SQL
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts