sfa-siard / siard-suite

Other
5 stars 0 forks source link

[MS Access]: Unable to show BLOB content in SIARD Suite from archived ms access db #96

Open mburri opened 2 months ago

mburri commented 2 months ago

The following MS Access DB contains images in the column flag, table country:

nations.zip

The resulting SIARD archive correctly contains the images, but it's not possible to view them from the application itself. Additionally, the MIME Type is not set in the columns meta data

A first analysis has shown, that there is possibly a bug when the database is archived: While the columns type is correctly resolved as BLOB, the cardinality returns 127 - which then makes the column of type array. See ch.admin.bar.siard2.cmd.PrimaryDataFromDb#getDataType in SiardCmd.

Further analysis has to be done:

mburri commented 2 months ago

The problem seems to be here:

ch.admin.bar.siard2.access.Shunting#convertTypeFromAccess

The type of the column is resolved as complex type (ATTACHMENT). Line 137 set cardinality to 127 - in case of an attachment, a BLOB type is initialized - but as an ARRAY(127) BLOB

The cardinality should probably be set to 1 (0) For ATTACHMENTS.

this needs a lot of testing and debugging to make it right.