No One should ever import images from Access ever again



Hello, going to explain exactly what is going on with these logos, if/when this becomes an issue again.  And why from now on No One should ever import images from Access ever again.

When inputting an image into the database through Access, Access formats the image into something called an OLE Image Object.  You can tell an OLE Image Object by looking at the value in the database in the table, because they start with 0x151C.  The reason why loading it through Access is such an issue is that it makes it impossible to load it normally through .Net applications, meaning you cannot view them through a desktop programor through any of our sites, you can only view them in Access and Crystal Reports.

 Access adds data to the beginning and end of the image for an undetermined number of bytes which depends on a number of factors such as the file type and location you loaded it from.  The only way to display such a file is to strip the bytes from the beginning and end of the “Package” that Access creates.  To do this would mean one would have to read the bytes in the file, understand the format of the file type to know where the actual file begins and ends, strip out the excess header and footer, and then create a new file from the “Package” that was just loaded into memory.  Which very well might take days of development, and whether it will be bug free is up in the air.  All of which would take way more effort than simply re-uploading the file using the proper .Net tools.

  Below are some links for further reading if desired:

Comments

Popular posts from this blog

Asp.net Publishing Broke Site - "App_WebReferences is not allowed because the application is precompiled"

Telerik - Custom Group Footers In RadGrid

Bootstrap Modal Popup is Grayed Out