Hi!

I'm new to asp.net.So,I created a simple project to connect it to a database
to see whether its working fine.

My database contains a table with three fields
1.EmpId
2.EmpName
3.EmpPhoto

I created database and entered a row by using SQL SERVER MANAGEMENT STUDIO EXPRESS 2005.

I used the following codes;

Create Table Customer ( EmpId int, EmpName varchar(50) not null, EmpPhoto varbinary(max) not null )

Insert Customer (EmpId, EmpName, EmpPhoto) Select 1001, 'Vadivel', BulkColumn from Openrowset( Bulk 'C:\ggg.png', Single_Blob) as EmployeePicture

But when I wanted to see this in Grid View itshows System.Byte[] in the EmpPhoto Column.

Please Help me with a understandable solution.

It's because of your data type on the Customer table. .NET converts SQL binary types to Byte arrays.

What did you want the field to show up as?

Actually, u r failed to convert image into vbbinary type. Check your code first.