Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem importing large text file.

Status
Not open for further replies.

Turbo

Programmer
Aug 23, 2000
93
0
0
US
I am running Access 2000 and I'm attempting to import a text file that is 95.5MB. When I open the import wizard the preview shows me rows of "?" and crosses. If I continue with the import Access locks up. I know the file is not corrupt because I scanned it for viruses. The file opened partially in Excel and allowed me to see that the data is in fact the correct data. My assumption is the file is simply to big, however the file can not be broken into sections based on its origin.

Is there any way to get round this?

Thanks,

Turbo
 
Use "bare bones" code.

If it will 'partially' import into Excel, then the data is organized fairly well. You can set up a "simple" array of fields (width/type ...). Read the file as 'Line Input', then parse the line into the fields. Place the fields into the database record (prefix this with ".AddNew" and postfix w/ .Update). Do it all in loop conditioned on the file EOF flag.

When I do this, I usually place any data conditioning code within this process, however this is really optional. In some cases, it is easier to to "import" everthing as text and then create a seperate table(s) for the final data accomplishing the transform for text to conditioned data via update/append queries.


MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Turbo,

You can also open the file in Word, save it as a text file, and then import it into Access.

hilbertl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top