Search code examples
ms-accessms-access-2000

How to store a String (length > 255) from a query?


I'm using Access 2000 and I have a query like this:

SELECT function(field1) AS Results FROM mytable;

I need to export the results as a text file.

The problem is: function(field1) returns a fairly long string (more than 255 char) that cannot be entirely stored in the Results field created from this query.

When i export this query as a text file, i can't see the string entirely. (truncated)

Is it possible to cast function(field1) so it returns a Memo type field containing the string ? Something like this:

SELECT (MEMO)function(field1) AS Results FROM mytable;

Do you know others solutions?


Solution

  • There is an official microsoft support page on this problem: ACC2000: Exported Query Expression Truncated at 255 Characters

    They recommend that you append the expression data to a table that has a memo field, and export it from there. It's kinda an ugly solution, but you cannot cast parameters to types in MS Access, so it might be the best option available.