I have a VBA routine which exports data to CSV for import into another app. Two of the fields I am working on have quite long XML strings as the contents.
Both of these fields are being corrupted on export. The values look fine in the query results, but by the time I export the data to CSV its a mess. An example is:
<ItemSpecifics>
<NameValueList>
<Name><![CDATA[Material]]></Name>
<Value><![CDATA[Solid Wood]]></Value>
<Value><![CDATA[Pine]]></Value>
<Source>ItemSpecific</Source>
</NameValueList>
<NameValueList>
<Name><![CDATA[Room]]></Name>
<Value><![CDATA[Bedroom]]></Value>
<???t?t?9\????t?t?t???t?t???t???9???9?????????????9?9???0
Any ideas why this might be happening?
–EDIT–
Ok, this can’t be coincidence – the corruption happens at character 256…. the access limit on a text field. Seems odd thyough because the result looks fine in the query results… any way around this?
I don’t have a definitive answer for you, but since I do a lot of importing & exporting among various databases and apps, I thought I would do a little googling of the problem.
What I have found is that Access has a limit of 255 on an export if you ask it to process the data, i.e. aggregating, de-duplicating, formatting, and so on.
I know this doesn’t describe your situation completely, but I thought it was close that this work around might help.
Someone said that the limitation is only when you export from a query, but not a table. His solution was to do an append query to a temp table, ten export that table.
Good luck