2 Replies - 1015 Views - Last Post: 09 June 2009 - 06:48 AM Rate Topic: -----

#1 hshs   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 05-January 09

store alink to image in db?

Posted 08 June 2009 - 04:24 PM

hi i want to know how to store image in sql,after alot of search i discover that the best way is to store alink (in this db)to this image
and store the image in another file but i did not know the steps to do this way
can any one tell me?
please quiqly and with detailes
Is This A Good Question/Topic? 0
  • +

Replies To: store alink to image in db?

#2 Trogdor   User is offline

  • D.I.C Addict
  • member icon

Reputation: 15
  • View blog
  • Posts: 627
  • Joined: 06-October 06

Re: store alink to image in db?

Posted 09 June 2009 - 02:51 AM

did you try google yet?
Was This Post Helpful? 0
  • +
  • -

#3 mikeblas   User is offline

  • D.I.C Regular
  • member icon

Reputation: 44
  • View blog
  • Posts: 390
  • Joined: 08-February 08

Re: store alink to image in db?

Posted 09 June 2009 - 06:48 AM

It is debatable if storing a link is the best method. The late Jim Gray wrote a great paper called To BLOB or Not To BLOB which analyses some of the trade-offs about large object storage.

Depending on the database server you're using, you might want to use a file-system integration feature. For example, SQL Server 2008 offers the FILESTREAM storage mechanism.

If you want to store a link, just store the file name in a VARCHAR field. If you want to store the actual image, use a VARBINARY field and put the bits right in there.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1