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. General Programming
  3. C#
  4. how we reterive image from sql database using browse button

how we reterive image from sql database using browse button

Scheduled Pinned Locked Moved C#
database
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.
  • S Offline
    S Offline
    shomic goyal
    wrote on last edited by
    #1

    hi can we get the code for reteriving the image from sql data base using browse button Shomic goyal

    J M N 3 Replies Last reply
    0
    • S shomic goyal

      hi can we get the code for reteriving the image from sql data base using browse button Shomic goyal

      J Offline
      J Offline
      jaipurguy1
      wrote on last edited by
      #2

      hellow i also need same code can anubody help us plzzzzzzzzzzz

      1 Reply Last reply
      0
      • S shomic goyal

        hi can we get the code for reteriving the image from sql data base using browse button Shomic goyal

        M Offline
        M Offline
        musefan
        wrote on last edited by
        #3

        :laugh: you both on the same course? and the answer to your questions is of course - no, you cant have the code. Look into the System.Data.SQLClient classes and give it a go yourselves. And might I suggest a better explanation of your problem too

        Life goes very fast. Tomorrow, today is already yesterday.

        S 1 Reply Last reply
        0
        • M musefan

          :laugh: you both on the same course? and the answer to your questions is of course - no, you cant have the code. Look into the System.Data.SQLClient classes and give it a go yourselves. And might I suggest a better explanation of your problem too

          Life goes very fast. Tomorrow, today is already yesterday.

          S Offline
          S Offline
          shomic goyal
          wrote on last edited by
          #4

          i am sorry i have one code for reteriving the image form data base but at present it not working so can i have the another option for that

          M 1 Reply Last reply
          0
          • S shomic goyal

            i am sorry i have one code for reteriving the image form data base but at present it not working so can i have the another option for that

            M Offline
            M Offline
            musefan
            wrote on last edited by
            #5

            Well as i dont know what your code is how can i possible know what the 'other' option is? I would hate to give you the same option you are already using. Why dont you post you code and detail the error you are getting and we can try to help you from there

            Life goes very fast. Tomorrow, today is already yesterday.

            1 Reply Last reply
            0
            • S shomic goyal

              hi can we get the code for reteriving the image from sql data base using browse button Shomic goyal

              N Offline
              N Offline
              nagendra vk
              wrote on last edited by
              #6

              Inserting ------------------------------------------------------------ ms = new MemoryStream(); pbEmp.Image.Save(ms,System.Drawing.Imaging.ImageFormat.Jpeg); byte[] data = new byte[ms.Length]; ms.Position = 0; ms.Read(data, 0, Convert.ToInt32(ms.Length)); cmd.Parameters.AddWithValue("@Photo", data); Retrieving ------------------------------------------------------------ byte[] data = (byte[])ds.Tables["tablename"].Rows[0][0]; ms = new MemoryStream(data); picturebox.Image = Image.FromStream(ms);

              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