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
BlakeMcKennaAsked:
Who is Participating?
 
Carl TawnConnect With a Mentor Systems and Integration DeveloperCommented:
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
 
käµfm³d 👽Commented:
It holds a PDF File.
The Image class doesn't support PDF. It supports bitmap-based images (e.g. BMP, PNG, TIFF).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.