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. Windows Forms
  4. Saving image to sql server using vb.net

Saving image to sql server using vb.net

Scheduled Pinned Locked Moved Windows Forms
helpcsharpdatabasesql-server
4 Posts 3 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.
  • N Offline
    N Offline
    nowords4u
    wrote on last edited by
    #1

    Help needed any Helpful exmaple /refrence to save image to sql server without using dataset i have tried googling and also see links here please give me any working link as most of the links/codes have bugs and are not working i tried this link but it gives error that , already in use http://www.vbdotnetheaven.com/UploadFile/scottlysle/ImageToSqlServer11242006025136AM/ImageToSqlServer.aspx[^]

    B N 2 Replies Last reply
    0
    • N nowords4u

      Help needed any Helpful exmaple /refrence to save image to sql server without using dataset i have tried googling and also see links here please give me any working link as most of the links/codes have bugs and are not working i tried this link but it gives error that , already in use http://www.vbdotnetheaven.com/UploadFile/scottlysle/ImageToSqlServer11242006025136AM/ImageToSqlServer.aspx[^]

      B Offline
      B Offline
      bluepoison
      wrote on last edited by
      #2

      Hi, I would suggest that you use a stored procedure like below. CREATE procedure pr_Insert_image @ImageName as varchar(20), @Image as image as if not exists (select * from tblimages where ImageName =@ImageName ) begin insert into tblimages(ImageName ,Image)values(@ImageName ,@Image) end To convert an image in .Net you could do this like below Dim objImageB As System.Drawing.Image objImageB = Drawing.Image.FromFile(Server.MapPath("~/images/no-photo-Available.jpg"))

      D 1 Reply Last reply
      0
      • B bluepoison

        Hi, I would suggest that you use a stored procedure like below. CREATE procedure pr_Insert_image @ImageName as varchar(20), @Image as image as if not exists (select * from tblimages where ImageName =@ImageName ) begin insert into tblimages(ImageName ,Image)values(@ImageName ,@Image) end To convert an image in .Net you could do this like below Dim objImageB As System.Drawing.Image objImageB = Drawing.Image.FromFile(Server.MapPath("~/images/no-photo-Available.jpg"))

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        bluepoison wrote:

        objImageB = Drawing.Image.FromFile(Server.MapPath("~/images/no-photo-Available.jpg"))

        It is a windows application and not a web application.

        It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD

        1 Reply Last reply
        0
        • N nowords4u

          Help needed any Helpful exmaple /refrence to save image to sql server without using dataset i have tried googling and also see links here please give me any working link as most of the links/codes have bugs and are not working i tried this link but it gives error that , already in use http://www.vbdotnetheaven.com/UploadFile/scottlysle/ImageToSqlServer11242006025136AM/ImageToSqlServer.aspx[^]

          N Offline
          N Offline
          nowords4u
          wrote on last edited by
          #4

          still could not figure it out is this impossible :((

          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