Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. saving and retrieving image data

saving and retrieving image data

Scheduled Pinned Locked Moved Database
databasequestioncsharpsql-serversysadmin
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rashid_Mehmood
    wrote on last edited by
    #1

    Hi All, I'm working on a c# application that suppose to store and retrieve images in the sql server database. By choosing a column of type image, it's size is defaulted to 16bytes but images usually are larger than that. How can I increase the size of an image column so that it can hold images of some 10+kb? Plz answer and oblige. Thanks

    C M M 3 Replies Last reply
    0
    • R Rashid_Mehmood

      Hi All, I'm working on a c# application that suppose to store and retrieve images in the sql server database. By choosing a column of type image, it's size is defaulted to 16bytes but images usually are larger than that. How can I increase the size of an image column so that it can hold images of some 10+kb? Plz answer and oblige. Thanks

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Rashid_Mehmood wrote: it's size is defaulted to 16bytes That is the size of the pointer to the image, not the image.


      Do you want to know more? WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums

      1 Reply Last reply
      0
      • R Rashid_Mehmood

        Hi All, I'm working on a c# application that suppose to store and retrieve images in the sql server database. By choosing a column of type image, it's size is defaulted to 16bytes but images usually are larger than that. How can I increase the size of an image column so that it can hold images of some 10+kb? Plz answer and oblige. Thanks

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        An image column can hold up to 2GB of data, IIRC. As Colin says, the 16 byte value is the pointer to where the data actually lives. Image data is not held on the same data page as the rest of the row - you should be aware that more I/O will occur if you use text, ntext or image columns. Having said that SQL Server has a feature 'text in row' which allows you to specify that up to a certain amount of data will be placed in the row itself, not on separate pages. Stability. What an interesting concept. -- Chris Maunder

        1 Reply Last reply
        0
        • R Rashid_Mehmood

          Hi All, I'm working on a c# application that suppose to store and retrieve images in the sql server database. By choosing a column of type image, it's size is defaulted to 16bytes but images usually are larger than that. How can I increase the size of an image column so that it can hold images of some 10+kb? Plz answer and oblige. Thanks

          M Offline
          M Offline
          Mr Cooper
          wrote on last edited by
          #4

          As a work around u can save the path to the images which will reduce the size of the db and also reduces the effort to handle images in sql. i hope this helps.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups