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. Visual Basic
  4. Saving Images

Saving Images

Scheduled Pinned Locked Moved Visual Basic
databasequestion
3 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.
  • S Offline
    S Offline
    structures83
    wrote on last edited by
    #1

    How do i save images into a database if i don't want to use the path name of the image

    A J 2 Replies Last reply
    0
    • S structures83

      How do i save images into a database if i don't want to use the path name of the image

      A Offline
      A Offline
      Ahamed Azeem
      wrote on last edited by
      #2

      convert the image into the byte array using memory stream and store in the database. Regards Azeem

      1 Reply Last reply
      0
      • S structures83

        How do i save images into a database if i don't want to use the path name of the image

        J Offline
        J Offline
        John Ad
        wrote on last edited by
        #3

        Hi, Here is the procedure for saving the image to the DataBase using SQL Server: 1. Get the content length of the image that is to be uploaded 2. Create a byte[] to store the image 3. Read the input stream of the posted file 4. Create a connection object 5. Open the connection object 6. Create a command object 7. Add parameters to the command object 8. Execute the sql command using the ExecuteNonQuery method of the command object 9. Close the connection object. You may refer to this[^] article for more information on this. Hope this helps.

        Vinay ComponentOne LLC. www.componentone.com

        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