Can any one please tell me how to retrieve image that i have stored in SQL SERVER 2000 and display the image in datagrid in VB.net 2003? I am able to display text data in datagrid but the picture cannot be display (in datagrid the picture is not shown but it display byte[]).

Any help will be appreciated. Thank you.

In .NET 2003 there is no built in column style for images, you will need to implement one yourself by deriving from DataGridColumnStyle. You have to implement the ExtractImageFromOleContainer() method of the DataGridImageClass.

If you need more help I can write a demo app. for you.

Comments
Kind and helpful

I have a table named Tool in SQL Server 2000 with 4 columns:
Tool_id
Tool_size
ToolImage - datatype Image ( which i store the actual image eg drill.jpg)
ImagePath - datatype varchar (which i store the image path eg D:\My Pictures\drill.jpg)

I'll be glad if you can tell me how to implement the ExtractImageFromOleContainer() method of the DataGridImageClass step by step or perhaps a demo app like you had offer.

Just for your information, im a beginner in VB.net programming.

I have a table named Tool in SQL Server 2000 with 4 columns:
Tool_id
Tool_size
ToolImage - datatype Image ( which i store the actual image eg drill.jpg)
ImagePath - datatype varchar (which i store the image path eg D:\My Pictures\drill.jpg)

I'll be glad if you can tell me how to implement the ExtractImageFromOleContainer() method of the DataGridImageClass step by step or perhaps a demo app like you had offer.

Just for your information, im a beginner in VB.net programming.

This article has been dead for over six months. Start a new discussion instead.