0

I'm connecting my windows form Datagridview into an access database.

On that access database I have a column for attachments.

How can I get it displayed on Datagridview in VB.Net?

The column type does not have Attachment option, so it turns the file I have on that column into a string. Is there anyway to make this work?

All I want pretty much is to allow the users to add, or open whatever attachments are added to a specific entry on a Database.

Images below:

enter image description here

Datagridview result :

enter image description here

OMGSOMETAL
  • 126
  • 2
  • 11
  • The Attachment field is known as a [multi-valued field](https://support.office.com/en-us/article/Guide-to-multivalued-fields-7C2FD644-3771-48E4-B6DC-6DE9BEBBEC31). You have two options to manipulate the data in this field. The first is to use DAO via the Access DB Engine. The second is to use ADO.Net and a hack to manipulate field data. See this [post](https://stackoverflow.com/a/45539111/2592875) for more info. – TnTinMn Jun 05 '18 at 14:38
  • Note that the attachment data type is not just a binary multi valued field, but it also does some compression depending on the type, making it near impossible to work with outside of DAO/Access. I would be very surprised if the ADO.Net hack worked for attachments – Erik A Jun 05 '18 at 16:06
  • I've been reading about it a bit more and found a snippet of code that allows me to see and to open the Attachment on my Windows Application. So that part is sorted, but now I also need to capability to add files to the entries. I'll update my post with this piece of code, if any of you could have a look and help me out with the adding bit that would be great. – OMGSOMETAL Jun 06 '18 at 12:09

0 Answers0