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. Web Development
  3. ASP.NET
  4. Problem in storing image in database

Problem in storing image in database

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netdatabase
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.
  • S Offline
    S Offline
    suzzain
    wrote on last edited by
    #1

    Hi all, I am saving an image in database in the image field but the image is getting saved in hexadecimal form inspite of the field defined as image type. When im trying to show the image through asp.net code im getting an error. Please help me how i can store the image in database and show it.

    K K R 3 Replies Last reply
    0
    • S suzzain

      Hi all, I am saving an image in database in the image field but the image is getting saved in hexadecimal form inspite of the field defined as image type. When im trying to show the image through asp.net code im getting an error. Please help me how i can store the image in database and show it.

      K Offline
      K Offline
      KhandelwalA
      wrote on last edited by
      #2

      There are two ways to store image in database......First one is to Convert the Image in Binary and store it in Database..........Second way is to store image physically at particular folder location and store Path of that image in Database

      1 Reply Last reply
      0
      • S suzzain

        Hi all, I am saving an image in database in the image field but the image is getting saved in hexadecimal form inspite of the field defined as image type. When im trying to show the image through asp.net code im getting an error. Please help me how i can store the image in database and show it.

        K Offline
        K Offline
        K0306
        wrote on last edited by
        #3

        try this link insert and retrieve image using sql[^][^]

        1 Reply Last reply
        0
        • S suzzain

          Hi all, I am saving an image in database in the image field but the image is getting saved in hexadecimal form inspite of the field defined as image type. When im trying to show the image through asp.net code im getting an error. Please help me how i can store the image in database and show it.

          R Offline
          R Offline
          r a m e s h
          wrote on last edited by
          #4

          Image data type will store the content of an image file in binary format. It will not show you the visual representation of image that you stored in it when you see a record in SQL server. Post the error message so that someone can help you to get the solution.

          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