Solved

Getting an error when loading a varbinary(MAX) column into a DataGridView

Posted on 2014-01-10
2
776 Views
Last Modified: 2014-01-10
I'm reading a Database Table and loading it directly into a DataGridView. I have a column in the DB Table defined as a VarBinary(MAX). It holds a PDF File.

The DGV will load successfully, however, my problem occurs when I scroll the dgv horizontally to view all the columns. Just before the column in question comes into view...it throws an error. See attachment for the error message.

Obviously this kind of field is huge and can't be loaded into a DGV. What is an alternative that will allow the record to be loaded into the DGV but even though the column has data in it?

Thanks,
Screenshot.jpg
0
Comment
Question by:BlakeMcKenna
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 39771490
Can you not just modify the query on your database so that you do not return the VARBINARY column, or at least not bind that column to the grid?
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39771506
It holds a PDF File.
The Image class doesn't support PDF. It supports bitmap-based images (e.g. BMP, PNG, TIFF).
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question