A
A
Andrew2012-01-27 05:18:25
Microsoft Access
Andrew, 2012-01-27 05:18:25

Question about exporting MS Access table to XML?

The table stores jpg-files; when exporting to XML, these images are converted to base64 format.

Take for example this picture
f19b9ec0226a965027e3539d8a2307b5.png

. Its export code looks like this:

FRw7AAIAAAAfAAgAFAAzAP/////O4frl6vIg8+/g6u7i+ejq4CDk6/8g7uHu6+73<br>
6ugAUGFja2FnZQABBQAAAgAAAAgAAABQYWNrYWdlAAAAAAAAAAAA9gEAAAIAZmF2<br>
aWNvbi5wbmcAQzpcVXNlcnNcQW5cRGVza3RvcFxmYXZpY29uLnBuZwAAAAMAKwAA<br>
AEM6XFVzZXJzXEFuXEFwcERhdGFcTG9jYWxcVGVtcFxmYXZpY29uLnBuZwDdAAAA<br>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAACXBIWXMAAC4jAAAu<br>
IwF4pT92AAAAj0lEQVR42mOoW7CBpohh1IKRbcF/VECkVDWtLaiav37UAvxSNI/k<br>
QWwBHjBqARx8+/kLSP76/effv39D0Ad0Tabvv3ylrQUfvn6jtQ9wWlBNlbLo+69f<br>
tLbgJ/kWVMxdR1GNRtCCqnlQFQ2LNjUs2dwIQpsaFm+qQVID5AIFgVJABWjay+et<br>
G222jFpAXQQAIPIwWJVw/PIAAAAASUVORK5CYIIqAAAAQwA6AFwAVQBzAGUAcgBz<br>
AFwAQQBuAFwAQQBwAHAARABhAHQAYQBcAEwAbwBjAGEAbABcAFQAZQBtAHAAXABm<br>
AGEAdgBpAGMAbwBuAC4AcABuAGcACwAAAGYAYQB2AGkAYwBvAG4ALgBwAG4AZwAf<br>
AAAAQwA6AFwAVQBzAGUAcgBzAFwAQQBuAFwARABlAHMAawB0AG8AcABcAGYAYQB2<br>
AGkAYwBvAG4ALgBwAG4AZwABBQAAAAAAAMOtBf4=<br>

And if you use the www.motobit.com/util/base64-decoder-encoder.asp service , the code turns out like this:

iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA<br>
j0lEQVR42mOoW7CBpohh1IKRbcF/VECkVDWtLaiav37UAvxSNI/kQWwBHjBqARx8+/kLSP76/eff<br>
v39D0Ad0Tabvv3ylrQUfvn6jtQ9wWlBNlbLo+69ftLbgJ/kWVMxdR1GNRtCCqnlQFQ2LNjUs2dwI<br>
QpsaFm+qQVID5AIFgVJABWjay+etG222jFpAXQQAIPIwWJVw/PIAAAAASUVORK5CYII=<br>


Moreover, during reverse decryption, the code received from Access does not turn into a picture.

Further, the XML file will be processed by means of PHP.

How can this be fixed? Is it possible to force Access to do the correct base64, or is there some way to get this picture from its weird code?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
4
4dmonster, 2012-01-27
@dasty

Take a closer look at what the access gave you - throw out the first four lines and voila, you will get what the service gives out.
The point is that your ole field stores data about the built-in object, and then the object itself.
well, base64 itself is correct

S
sadgb, 2012-01-27
@sadgb

It looks like you'll need to
use the GDI+ lib from MS (included in standard Win) to import and export images to/from Access OLE
If I understand the problem correctly, the first answer from here might nudge you in the right direction
stackoverflow.com/questions/114326/converting -ms-access-ole-objects-back-to-plain-jpegs-best-way
then this might solve the problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question