Just make sure if you have it declared to link it to the control using its imagelist property if that is what you are planning to do. This will load every Image from the table into a Imagelist, You can either have it declared in code or have one on your form, either will work. (dr( " ID").ToString(), New Bitmap(img_stream)) The first step you have to do is to create a Database table name it Pic, which should contain the two, fields 1: Name 2: Picture.The data Type of the Name field is (nVarChar) and data type of Picture is (Image) in Sql Server 2000.Note:This Database should be in SQLS erver. Img_stream.Write(img_buffer, 0, img_buffer.Length) Once the image is converted to a byte array, it's saved to a database by using coding. Imglist.ColorDepth = ColorDepth.Depth32BitĬommandString = " select * from tblImages" Dim dt_images As New DataTableĭim img_buffer = CType(dr( " ImageBlob"), Byte())ĭim img_stream As New MemoryStream(img_buffer, True) Delphi library for simplifying image load/save. Dim Database as string = " C:\Images.db" Dim CommandString As String Dim CN As New SQLite.SQLiteConnection( " Data Source="
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |