am having a table that contain some images, I want to retrieve the images from the table and display the inside the picture box on my form in vb.net, I have the code that display just one image at a time...
my question is how can i update this code to be able to display multiple images into my picture boxCode:Dim cn As SqlConnection cn = New SqlConnection cn.ConnectionString = "Data Source=ALLAYE\SQLEXPRESS;Initial Catalog=E-commerce;Integrated Security=True" Dim cmd As New System.Data.SqlClient.SqlCommand("use [E-commerce];SELECT ProductTB.ProductImage FROM ProductTB WHERE ProductID = 'shoe1'") cn.Open() cmd.Connection = cn Dim ImgStream As New IO.MemoryStream(CType(cmd.ExecuteScalar, Byte())) cmd.CommandType = CommandType.Text ProductImagePictureBox.Image = Image.FromStream(ImgStream) ImgStream.Dispose() cmd.Connection.Close()




Reply With Quote
