Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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 20th, 2006, 02:13 PM
Authorized User
 
Join Date: Apr 2006
Posts: 79
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to anujrathi Send a message via MSN to anujrathi Send a message via Yahoo to anujrathi
Default How can we store Images

Hi friends,

Can any one tell me that how can we store Images ie(.bmp or .jpeg or .gif) in the SQL Server database table & also in Oracle.
& after that how can I retrieve them to show in a web page.

If possible then pls give the coding also
 
Old June 20th, 2006, 04:52 PM
Authorized User
 
Join Date: Oct 2005
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's a link that may be able to help you, which is written in C#

http://www.codeproject.com/aspnet/PicManager.asp

SQL Server Helper
How well do you know SQL? Find out with the free test assessment from SQL Server Helper!!!
http://www.sql-server-helper.com/free-test/default.aspx
 
Old June 22nd, 2006, 02:27 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In general it is a bad idea to store the actual pictue in the database. Only small application thinking MS suggests this. Normally in larger situations you would create a table that would store the file location. For example \\pictureserver\group1\pic234.jpg.
I prefer to break it down to multiple fields Server = "pictureserver" Drive or share, a path, and then the file name = 'pic234.jpg'.

Thes keeps your sql database smaller because there is no reasonable reason to make it enormous and slow down backups by putting the pictures in the database.

this allows you to keep your sql database in one place and put the pictures in many places without headaches. If you later move the files, you simply update your server/path/etc in the sql database.

Keep it small it runs better that way. Don't follow the MS way of doing things if you think your app will grow in space with all the pictures in it. Also try to limit the number of pictures in a given path, say 1000 or so. The file system can read/write the files quicker that way.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Images from and Save Images to a Database cyndie VB.NET 2 August 17th, 2008 06:42 AM
Store and Retrieve Images in SQL Database derekl ASP.NET 1.0 and 1.1 Professional 4 December 19th, 2007 03:16 AM
how to store images cancertropica SQL Server 2000 2 November 30th, 2007 03:18 PM
Store Procedures ! augustine SQL Server 2000 1 September 15th, 2004 01:29 PM
Retrieve and store the images from server URL ccc_storage Classic ASP Professional 13 August 19th, 2004 07:28 AM





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