Data Type Conversion Error on Import

Seti

Well-known Member
Joined
May 19, 2002
Messages
2,916
I am trying to import a text file, fixed width (419 bytes), and I get the above error. This is due to Access dropping a byte or two of data after every 4096 rows. This causes all of the data to shift one byte to the left on row 4097 for example, and produces invalid dates. 01311998 becomes 13 11 998_. Is this a known bug? Is there a work around?

Currently I am resorting to opening my text file in a text editor, cutting 60,000 rows at a time into Excel, and then linking Access to Excel. Based on the size of the files and the number of files, I would rather just go directly into Access.

Any ideas? Thanks.

Seti
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Well, I found out what the problem was. When the text file was created, the line end character was a single new line character and Access needs both the carriage return and new line character when importing text files. When I added the additional character to each line, the problem disappeared. Thanks to all who pondered this.

Seti
 
Upvote 0

Forum statistics

Threads
1,221,569
Messages
6,160,557
Members
451,656
Latest member
SBulinski1975

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top