Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pictures & Websites

0 views
Skip to first unread message

Henry Mclaughlin

unread,
Jul 2, 2002, 1:00:42 AM7/2/02
to
I have a SQL server that is accessed via ODBC by the Web Server.
I would like to add a facility for pictures to be added to rows.
For these pictures to be displayed online must they be stored on the
WebServer or can they be stored in the db and accessed via odbc etc ?
Am I doing this the totally wrong way and can someone point me in the right
direction.

Thanks in advance...

Henry


Adrian Forbes [MVP]

unread,
Jul 2, 2002, 1:04:58 AM7/2/02
to
Store the images on the hard drive and just store the location of the images
in the database

"Henry Mclaughlin" <henry_mc@(nospam)hotmail.com> wrote in message
news:ugpPOVYICHA.2564@tkmsftngp08...

Henry Mclaughlin

unread,
Jul 2, 2002, 1:21:19 AM7/2/02
to
This is an option I had thought of but would these images need to be on the
webserver itself or can they be passed to the server via odbc ?


"Adrian Forbes [MVP]" <noe...@noemail.xxx> wrote in message
news:OLZVnXYICHA.2096@tkmsftngp12...

J. Paul Schmidt

unread,
Jul 2, 2002, 1:48:34 AM7/2/02
to
Henry,

Either way will work, but I think the usual way is outside of the database so
that the database doesn't just get huge on you...

Displaying Images that Reside in a Database - 6/1/2000
http://www.4guysfromrolla.com/webtech/060100-1.shtml
"There are oftentimes when images or other binary information needs to be
stored along with textual information in a database. For example, imagine a
database that contains Employee information. Some non-textual information that
one may wish to store in this database could be a picture of the employee and
the employee's current resume in Word format. This article focuses on how to
save and retrieve image information."

Serving Dynamic Images from Static Web Pages - 5/24/2000
http://www.4guysfromrolla.com/webtech/052400-1.shtml
Note the Response.Redirect to the filename as the last line of code in
/scripts/ShowPictureOfTheDay.asp. Whatever image you need to dynamically
display (be it a banner ad, a "Picture of the Day," or a random image), you
will always want a Response.Redirect at the end pointing to the image to
display.
And in the static page:
<IMG SRC="/scripts/ShowPictureOfTheDay.asp">

Best regards,
J. Paul Schmidt - ASP Web Developer
http://www.Bullschmidt.com - To put live data on the Web...

Adrian Forbes [MVP]

unread,
Jul 2, 2002, 2:22:18 AM7/2/02
to
> This is an option I had thought of but would these images need to be on
the
> webserver itself or can they be passed to the server via odbc ?

You can store the image on the webserver and the location on the webserver
in the database, or store its URL. ie have an image in

c:\inetpub\wwwroot\myweb\images\picture.jpg

and in the database store the location as "\myweb\images\picture.jpg"


dk

unread,
Jul 2, 2002, 9:35:46 AM7/2/02
to
Yes, the best method is to store the images in the file system and the path
in the database. The below article is a good reference:

Q299320 HOWTO: Display Image on Web Page When Path Is Stored in Database
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q299320

John Sirmon, MCSD
Microsoft Visual Basic Web Data Support Team
joh...@Online.microsoft.com

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

Jeff Cochran

unread,
Jul 2, 2002, 12:05:29 PM7/2/02
to
You don't want to send the images through an ODBC connection, you want
them somewhere you can access them with a URL, then simply pass the
URL. Or depending on your front end code, the portion of the URL that
is required.

Jeff

0 new messages