Export large records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to export a file in csv format but I get the following error when I
try to save the specs:

The field 'Ship_Ahead' contains a start position of '32896'. The maximum
start position allowed is 32767.

Any idea how I can work around this? I must export the file exactly how it
is to be received by my other software.
 
Hi David,

It sounds as the table or query you're exporting has one or more large
memo fields. The standard text file export routine seems to have a
limit on the size of record it can handle, and I think you're probably
hitting it.

The only work-round I know is to write VBA code that creates a text
file (using the Open statement), opens a recordset on your query, and
iterates through it. For each rcord, iterate through the fields,
writing each to the output file with the Print # statement.
 
It isn't that the records are large. Rather it's too many records for Excel.
CSV is an Excel format.

Actually Excel 2003 can handle up to 65,536 rows. How are you exporting the
file? TransferSpreadsheet? You might be using an older version of the Excel
file format.

You might try exporting the file with an extention of .txt then changing it
to .csv.

FYI: Excel 2007 can handle a million rows if memory serves.
 
Actually, the file comes to me in .dat format. I rename it to .csv, import it
into access, and edit the contents. I need to write the information back into
a .csv (or other compatible format) so I can rename it to .dat and then
import it into my order processing software.

It's not too many records for Excel. There's only about 25 records.
Unfortunately, many of the fields are quite large resulting in the problem I
am working with.

I have no control over how the .dat file arrives and I have no control over
how the order processing software processes the .dat file. I have found that
I can make one adjustment to the file that results in the orders being
processed correctly. I'm automating this process and everything works except
the writing of the data to a .csv file.
 
Back
Top