473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Error when importing text file into Access?

Hi all,

I have been having this problem whereby after using the import function of Access, my text file actually gets reordered. Meaning the rows are all jumbled up and different from what is displayed on my text file. Is this because my text file contains too many lines (500000+) so Access has difficulty importing it?

How do I work around this?
Nov 18 '14 #1
3 1115
Rabbit
12,516 Expert Mod 8TB
You can't guarantee the order of rows in a table unless you write a script to process the text file line by line. Which can take a long time to process if you have a lot of data.
Nov 18 '14 #2
Hi Rabbit,

Can you provide me with an example of the code that will be able to help me?
Nov 19 '14 #3
Rabbit
12,516 Expert Mod 8TB
An example wouldn't be much help because the bulk of it would change depending on the file layout. But the basic steps are:

1) Read a file line by line
2) Break out the line into the fields you need (this is where the bulk of the code would be and also where the changes are depending on the layout)
3) Insert that row of data into the database table with an autonumber field.

Steps 1 and 3 are fairly standard. Number 2 is where there are lots of changes depending on your file layout.
Nov 19 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tomo | last post by:
I'm trying to import text file into some oracle table. I created control file, and text file, create table ..and run sqlldr80 from command promt.. Imort was not succesfull..error...
7
by: nizar.jouini | last post by:
Hello. I have long text file whitch is formatted like this: nextrow4 asdf asdf
10
by: hendafe | last post by:
I have a problem of importing a text file into Access. The text file will be imported using a delimiter, say ( , ) for example. This should be imported into the database. An example is: John,...
5
by: Alex | last post by:
Hi, I have an aspx file that creates a custom class object and calls a method which should return a DataSet. It throws a: Description: The application attempted to perform an operation not...
3
by: ghadley_00 | last post by:
Hi, I have a MS access database into which I need to import a text file that is oriented vertically (fields are listed from top to bottom with the value for each field appearing to the right of...
1
by: lled | last post by:
I have a text file which I import on a daily basis - it goes into the same table, is set up exactly the same each time. The only thing that is different is the file name. Is there anything more...
3
by: gulllet | last post by:
I try to import a tab separated text file into sql server 2005 using the import guide. But when running the job I get the error message Error 0xc02020c5: Data Flow Task: Data conversion failed...
1
by: nathanangula | last post by:
Hi All I am currently trying to import data from a text file to a table in Access and dont seem to have much idea of how I can do it. I have a little background of VB6 but I am not very...
3
kickingthehabbit
by: kickingthehabbit | last post by:
Hi All new to all of this I just downloaded reactor server. everything works fine except Mysql - SQL import files. I am trying to import file createdb.sql I open DB and try and import with...
9
by: adamjblakey | last post by:
Hi, I have a strange issue, i have a txt file on the server with the following text in: In what ways has 'time-space compression' transformed geographies of consumption and production? I am...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.