One thing you should know about storing images in a database is that the database will become VERY large depending on the size of each image and the number of images you store. Set the PictureBox.Image property to Image.FromFile using the path and filename in the global variable. The second form has only 1 PictureBox with its SizeMode set to Zoom. If the click occurs in the second column, I retrieve the filename (including its path which I also show in the DataGridView, and pass that in a global variable to a second form. In this example, if the click occurs in any column other than the second column (index 1) then don't do anything (Exit Sub). This is something I used a few weeks ago to do just that: Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As ) Handles DataGridView1.CellContentClickįn = DataGridView1.Item(1, e.RowIndex).Value.ToString Yes, you can click on an image in a DataGridView and have it display larger.
![copyimage from msaccess to mssql vb script copyimage from msaccess to mssql vb script](https://www.sourcecodester.com/sites/default/files/styles/medium/public/2019-08-29_00_29_10-index.html_.png)
You can store any image format in the database because you are storing it using Byte data.