visual basic.net 2005 front end and access 2007 as backend , need help with storing images

I would like to know if it is possible to insert an image (jpeg, bitmap) next to the path that already exists in access database and be able to see the image along with the path within the datagridview in visual basic 2005 run time?
Please let me know
LVL 1
systems_axAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vs1784Commented:
You want to insert image path and image as binary data in same column?
0
systems_axAuthor Commented:
This is what I have:
2 columns in access 2007:

Path to the file:                        Name of report that shows
Files\Building1.doc                   Building1

I am able to retrieve the name of the file and open it VIA the datagridview in vb.net 2005 but I also need to display an image under the same column as the file's name on the datagridview.

Please let me know how I can do this.
0
vs1784Commented:
Below is sample code i found for that. Check it should help you show images in datagridview
Dim myIcon As New Icon("..\Images\Icon1.ico") 
        Dim ImgCell = New DataGridViewImageCell(True)
        Dim ImgColumn1 As New DataGridViewImageColumn
        Dim ImgColumn2 As New DataGridViewImageColumn
 
        ImgColumn1.CellTemplate = ImgCell
        ImgColumn2.CellTemplate = ImgCell
 
        Me.DataGridView1.Columns.Add(ImgColumn1)
        Me.DataGridView1.Columns.Add(ImgColumn2)
 
        Dim dg As DataGridViewRow
        Dim dc As DataGridViewImageCell
 
        For Each dg In DataGridView1.Rows
 
            For Each dc In dg.Cells
 
                dc.Value = myIcon
 
            Next
 
        Next

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

systems_axAuthor Commented:
hi vs1784,
can you please explain what the code means line by line.  Do I create an access row for images or do I do it ONLY via code in visual basic?
thank you
0
systems_axAuthor Commented:
hi vs1784,
Unfortunately, I do not need an additional image column, I need to have an image right next to the text under 1 column.
thank you
0
systems_axAuthor Commented:
can you helpo in storing an image under 1 column with text also?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.