Discussion:
[mdb-dev] Memo field with binary data
Vasilis Vlachoudis
2011-08-25 14:27:10 UTC
Permalink
Hi all,

I have a database that I want to read from linux, in which the Memo field contains variable length binary data actually a list of double precision numbers.
The problems are:
1. The memo is reported with max length of 255, however it contains more than 255 characters. MS-Access it claims that the Memo can be up to 64k
2. Since the memo field contains binary data, it contains also '00'x characters which forces the mdb-export to stop on the first null char, rather dumping the whole string.

How can I extract the binary data (length and actual data) unprocessed so I can access the numbers

Best Regards
Vasilis
Vasilis Vlachoudis
2011-08-25 15:15:28 UTC
Permalink
Hi all,

looking in the source code of mdblib I saw that the column->len_ptr holds the length of the object, then modifying a bit the mdb-export.c to dump *(col->len_ptr) characters I correctly the memo fields in some of the rows, but it fails completely in some other rows.
When it fails it report smaller size e.g 521 instead of 2336.
Vasilis Vlachoudis ]
1970-01-01 00:00:00 UTC
Permalink
Vasilis
________________________________
From: Vasilis Vlachoudis [***@cern.ch]
Sent: 25 August 2011 16:27
To: mdbtools-***@lists.sourceforge.net
Subject: [mdb-dev] Memo field with binary data

Hi all,

I have a database that I want to read from linux, in which the Memo field contains variable length binary data actually a list of double precision numbers.
The problems are:
1. The memo is reported with max length of 255, however it contains more than 255 characters. MS-Access it claims that the Memo can be up to 64k
2. Since the memo field contains binary data, it contains also '00'x characters which forces the mdb-export to stop on the first null char, rather dumping the whole string.

How can I extract the binary data (length and actual data) unprocessed so I can access the numbers

Best Regards
Vasilis

--_000_0BC70B5D93E054469872FFD0FE07220E68EF986CPLOXCHG13cernch_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi all,<br>
<br>
looking in the source code of mdblib I saw that the column-&gt;len_ptr holds the length of the object, then modifying a bit the mdb-export.c to dump *(col-&gt;len_ptr) characters I correctly the memo fields in some of the rows, but it fails completely in some other
rows.<br>
When it fails it report smaller size e.g 521 instead of 2336.<br>
<div><br>
>
Nirgal
2011-08-27 06:04:41 UTC
Permalink
mdbtools does not support \0 in memo fields.

mdbtools is using iconv to convert charsets in memo fields, so it will probably destroy your data first anyways.

I wonder how you could put some binary in there by the way. :)

Can you try convert these into Ole/Binary fields first? These should work.


On Thursday 25 August 2011 14:27:10 Vasilis Vlachoudis wrote:
> Hi all,
>
> I have a database that I want to read from linux, in which the Memo field contains variable length binary data actually a list of double precision numbers.
> The problems are:
> 1. The memo is reported with max length of 255, however it contains more than 255 characters. MS-Access it claims that the Memo can be up to 64k
> 2. Since the memo field contains binary data, it contains also '00'x characters which forces the mdb-export to stop on the first null char, rather dumping the whole string.
>
> How can I extract the binary data (length and actual data) unprocessed so I can access the numbers
>
> Best Regards
> Vasilis
>
Vasilis Vlachoudis
2011-08-28 06:24:50 UTC
Permalink
I've inherited the database, and I don't have Office to modify it.
Is there a way to change to avoid the iconv conversion in mdb to access the data as such.

Vasilis

________________________________________
From: Nirgal [***@nirgal.com]
Sent: 27 August 2011 08:04
To: Vasilis Vlachoudis
Cc: mdbtools-***@lists.sourceforge.net
Subject: Re: [mdb-dev] Memo field with binary data

mdbtools does not support \0 in memo fields.

mdbtools is using iconv to convert charsets in memo fields, so it will probably destroy your data first anyways.

I wonder how you could put some binary in there by the way. :)

Can you try convert these into Ole/Binary fields first? These should work.


On Thursday 25 August 2011 14:27:10 Vasilis Vlachoudis wrote:
> Hi all,
>
> I have a database that I want to read from linux, in which the Memo field contains variable length binary data actually a list of double precision numbers.
> The problems are:
> 1. The memo is reported with max length of 255, however it contains more than 255 characters. MS-Access it claims that the Memo can be up to 64k
> 2. Since the memo field contains binary data, it contains also '00'x characters which forces the mdb-export to stop on the first null char, rather dumping the whole string.
>
> How can I extract the binary data (length and actual data) unprocessed so I can access the numbers
>
> Best Regards
> Vasilis
>
Loading...