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. Database & SysAdmin
  3. Database
  4. Image

Image

Scheduled Pinned Locked Moved Database
sql-serverhelp
7 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.
  • R Offline
    R Offline
    rdop
    wrote on last edited by
    #1

    Hi All I have a data of MSSQL Image filed.I have insert picture .bmp then i am getting data like this . 0x433A5C446F63756D656E747320616E642053657474696E67735C4D697274756E6A61795C4465736B746F705C756E7469746C65643131312E626D70 Now i want to convert this data into Image. Plz help me

    C I 2 Replies Last reply
    0
    • R rdop

      Hi All I have a data of MSSQL Image filed.I have insert picture .bmp then i am getting data like this . 0x433A5C446F63756D656E747320616E642053657474696E67735C4D697274756E6A61795C4465736B746F705C756E7469746C65643131312E626D70 Now i want to convert this data into Image. Plz help me

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You need to put the data into a stream and load your bitmap from that. SQL Server has no idea what sort of data you stored ( image just means a lump of data in this case, not a picture ).

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      R 1 Reply Last reply
      0
      • C Christian Graus

        You need to put the data into a stream and load your bitmap from that. SQL Server has no idea what sort of data you stored ( image just means a lump of data in this case, not a picture ).

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        R Offline
        R Offline
        rdop
        wrote on last edited by
        #3

        Thanks for reply.How to do that can you help me.That time my table have my table have column name "Image" data type "Image".Plz help me

        C 1 Reply Last reply
        0
        • R rdop

          Thanks for reply.How to do that can you help me.That time my table have my table have column name "Image" data type "Image".Plz help me

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Well, you would use the MemoryStream class and the Bitmap.FromStream method. It's hard to say more without knowing more about your project, but the MSDN examples and the names of the classes to use should be all that you need, anyhow.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          1 Reply Last reply
          0
          • R rdop

            Hi All I have a data of MSSQL Image filed.I have insert picture .bmp then i am getting data like this . 0x433A5C446F63756D656E747320616E642053657474696E67735C4D697274756E6A61795C4465736B746F705C756E7469746C65643131312E626D70 Now i want to convert this data into Image. Plz help me

            I Offline
            I Offline
            i i i
            wrote on last edited by
            #5

            Function LoadImage(ByVal PicSave As PictureBox) As Image

                            Dim arrayImage() As Byte = CType(dr.Item("DbFld"), Byte())
                            Dim ms As New MemoryStream(arrayImage)
                            LoadImage = Image.FromStream(ms)
                    
                        End If
                    End While
                    dr.Close()
                    Return LoadImage
            
            
            End Function
            

            Best Regards, SOFTDEV If you have knowledge, let others light their candles at it

            C 1 Reply Last reply
            0
            • I i i i

              Function LoadImage(ByVal PicSave As PictureBox) As Image

                              Dim arrayImage() As Byte = CType(dr.Item("DbFld"), Byte())
                              Dim ms As New MemoryStream(arrayImage)
                              LoadImage = Image.FromStream(ms)
                      
                          End If
                      End While
                      dr.Close()
                      Return LoadImage
              
              
              End Function
              

              Best Regards, SOFTDEV If you have knowledge, let others light their candles at it

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Well, I try to make people do a little research, but there's enough assumptions and problems with this code that I assume you're doing the same, so.....

              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

              I 1 Reply Last reply
              0
              • C Christian Graus

                Well, I try to make people do a little research, but there's enough assumptions and problems with this code that I assume you're doing the same, so.....

                Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                I Offline
                I Offline
                i i i
                wrote on last edited by
                #7

                hmm , Thats interesting , this is the reason why i put the code, can i know what problem this code has , as you know problem is the gateway to development :-D

                Best Regards, SOFTDEV If you have knowledge, let others light their candles at it

                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