Link to home
Start Free TrialLog in
Avatar of BlakeMcKenna
BlakeMcKennaFlag for United States of America

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It holds a PDF File.
The Image class doesn't support PDF. It supports bitmap-based images (e.g. BMP, PNG, TIFF).