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. saving image in sql database

saving image in sql database

Scheduled Pinned Locked Moved ASP.NET
databasecsharpasp-nettutorial
6 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
    rmedo
    wrote on last edited by
    #1

    Hi all, i want to know how to store image in SQL database from asp.net page then retrieve and display it in another page. please answer me as soon

    N V V 3 Replies Last reply
    0
    • R rmedo

      Hi all, i want to know how to store image in SQL database from asp.net page then retrieve and display it in another page. please answer me as soon

      N Offline
      N Offline
      nikneem2005
      wrote on last edited by
      #2

      I would not recommend storing images in your database because of performance issues. Store the URL of the image instead and store the image itself just as a file somewhere on your webserver.


      I love it when a plan comes together http://www.zonderpunt.nl[^]

      1 Reply Last reply
      0
      • R rmedo

        Hi all, i want to know how to store image in SQL database from asp.net page then retrieve and display it in another page. please answer me as soon

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        http://www.codersource.net/csharp_read_write_images_database.aspx[^]

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        R 1 Reply Last reply
        0
        • V Vasudevan Deepak Kumar

          http://www.codersource.net/csharp_read_write_images_database.aspx[^]

          Vasudevan Deepak Kumar Personal Homepage Tech Gossips

          R Offline
          R Offline
          rmedo
          wrote on last edited by
          #4

          Thanks for your reply, this article toke about Windows Application and i need Web page, i think it differ, so if you know any thing please tell me

          V 1 Reply Last reply
          0
          • R rmedo

            Thanks for your reply, this article toke about Windows Application and i need Web page, i think it differ, so if you know any thing please tell me

            V Offline
            V Offline
            Vipin d
            wrote on last edited by
            #5

            Saving image into database is not a good idea.I recommend u to save image ina specific folder and save its file name in the Database. if u want to save this file in database first u convert it to byte arrya nad save it. In the database(MSSQL 2005) the datatype of that filed is varbinary(MAX). I hope you are using asp:FileUpload control for uploading the file.It have a proeprty named FileBytes, we can convert this file into binary byte[] FileData; FileData=FileUpload1.FileBytes; and u can inert this binary arry to DB I hope this ll help u

            All I ever wanted is what others have.... CrazySanker

            1 Reply Last reply
            0
            • R rmedo

              Hi all, i want to know how to store image in SQL database from asp.net page then retrieve and display it in another page. please answer me as soon

              V Offline
              V Offline
              Vipin d
              wrote on last edited by
              #6

              Saving image into database is not a good idea.I recommend u to save image ina specific folder and save its file name in the Database. if u want to save this file in database first u convert it to byte arrya nad save it. In the database(MSSQL 2005) the datatype of that filed is varbinary(MAX). I hope you are using asp:FileUpload control for uploading the file.It have a proeprty named FileBytes, we can convert this file into binary byte[] FileData; FileData=FileUpload1.FileBytes; and u can inert this binary arry to DB I hope this ll help u All I ever wanted is what others have.... CrazySanker

              All I ever wanted is what others have.... CrazySanker

              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