473,473 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Speed Up Access Query to CSV Linked Tables

7 New Member
I have a microsoft access database ver. 2003 with linked table to a huge csv file. This csv file is about 800 MB size what couldn't be imported to access by any way because each time I am trying to import it, it exceeds the max size of an access database. I need to make a search query into this linked table but when I am running such query it hangs and freezes because the linked tables couldn't be indexed. So, I need your advice to fix this issue and to be able to search in this csv linked table via access query or vb code.
Dec 13 '11 #1
13 4351
Rabbit
12,516 Recognized Expert Moderator MVP
Not much you can do. Have you tried importing the file into a blank database file and linking to that? That way you can create the proper indexes. And if space is an issue, make sure to use the smallest data types you can get away with. Other than that, the only other option is to upsize your database to a different system.
Dec 13 '11 #2
Amr Ali
7 New Member
Rabbit,
i am using all fields as text while importing the file but access doesn't let me completing the process as it shows me an error ## invalid argument coz the max size was reached.
Dec 14 '11 #3
Mihail
759 Contributor
Just an idea:
Create as much databases as you need in order to import parts (not all the .csv file).
Then create a Front End database to manage all this.

Hope you understand what I mean.
Dec 14 '11 #4
Amr Ali
7 New Member
how can i control the size of csv imported data while i can't open this csv file as it's sooo huge 800 MB
Dec 14 '11 #5
sierra7
446 Recognized Expert Contributor
Hi
How many rows and columns in your csv file?

Will the csv load into Excel ? (Probably stupid question!)

S7
Dec 14 '11 #6
Amr Ali
7 New Member
it's delimited with | separator and includes 209 columns of data and about 500,000 rows
Dec 14 '11 #7
Mihail
759 Contributor
http://en.wikipedia.org/wiki/Comma-separated_values

So, .csv files can be open in a normal text editor (Note Pad, Word Pad, Word). Maybe you can manage this in this mode.

Of course, if you need to do this frequently, you can forget what I say before.

Any way, you can use a text editor (I recommend Word Pad) to keep only the LAST 20 or 30 rows in order to zip it and attache to your next post (be aware: work on a copy).
I'll try to sketch some code to help you to split (or import in databases, I'll see) the .csv file.

For that I'll need some more information:
- How you want to be divided ? (Each column in order to create a table ? After a reasonable number of rows in order to create tables with the same structure ?)
- What names you wish for each column ?
- What is the max size you need ?

If you think that are other information that can help post it too.

Good luck !
Dec 14 '11 #8
Amr Ali
7 New Member
Mihail,

Thank you so much for your fast reply and for helping me, but i would like to attract your attention that i'll do it frequently on a weekly basis.
Regarding importing the csv file into word pad, i think it will be the worse choise coz i tried it before and after 2 hours it hanged and froze without success.
I attached a zip file what includes all column headers which will help you to do what you suggested before.
I need to import the csv file into more than 1 database and then manage all tables via only 1 master database or link this csv file to a database but in this case the query will be sooo slow specially in 2007 access format.
Attached Files
File Type: xls CSV.xls (32.5 KB, 606 views)
Dec 14 '11 #9
sierra7
446 Recognized Expert Contributor
OK
So your data is very 'wide' and 'long'.

I have some code that would sequentially read each row then substring the data into fields in an Access database. You could read 100,000 rows at a time but because there are over 200 columns it would be very 'code intensive' and be slow.

You would still be left with the problem of having to handle multiple databases.

I think Rabbit's original suggestion of uploading it to a different system (MS SQL Server or MySQL) then using an Access front end to manipulate it, would be a better solution.

SQL Server Express is free and downloadable.
I have just tested this by loading a 340 column wide csv into SQL Server and the Wizard handled it fine, and was quick.

Unfortunately, importing it as a Flat File did not allow the first row to be treated as column headings (field names) and it assigned Column1, Column2 etc. I then tried by reading my csv into Excel and saved it as .xlsx then used the Excel driver in the Wizard to import but this failed due to a data integrity problem at about row 10,000 (only about half the total)

This was just an exploratory test because although I had read it was possible I have never tried.

S7
Dec 14 '11 #10
Mihail
759 Contributor
As long as you don't send at least the information I ask I can't help you.
Read again my previous post.
Dec 14 '11 #11
Amr Ali
7 New Member
Mihail,

i read your post again and i attached the csv file columns on my reply and regarding your questions:

- How you want to be divided ?
i need it to be separated after every 105 columns and 250,000 row.

- What names you wish for each column ?
as attached in my file.

- What is the max size you need ?
max size that it will be light when making a search query.
Dec 14 '11 #12
NeoPa
32,556 Recognized Expert Moderator MVP
I have to agree with Rabbit in post #2. This would be a job for a larger capacity system. 800MB is only 40% of capacity for an Access database, but the data has to be imported first. Still, I'm surprised it expands it by as much as 250%.

PS. WordPad is not a text editor. It should never be used for data manipulation in this way. There are various text editors around (My own favourite is TextPad) of which NotePad comes with Windows and can now handle larger files better than the earlier versions.
Dec 14 '11 #13
Mihail
759 Contributor
@Amr Ali,
I am sure that ADezii's (and NeoPa's and S7's) advices are the best solution for you.
Also I am sure that they will help you to accomplish the task if you decide to do that.

About my request you have omitted to attach a little bit from your .csv file (I need that to play with).
Dec 14 '11 #14

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

Similar topics

2
by: Dave | last post by:
Hi everyone. I have an interesting problem. We have two PHP shops that use MySQL databases. The database structures are exactly he same. Due to the two companies now working together we want the...
1
by: infopimp | last post by:
hi There, New to ASP, I'm trying to display records from an access qry which takes data from several tables two of which are linked. The db which is the source of my qry is on my web server...
7
by: Joe | last post by:
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource (using Oracle ODBC drivers). After linking the tables in Access, I inspect the data contained in the linked tables. For...
8
by: ZRexRider | last post by:
Hi, I am working on an Access application where the author used SQL back end via linked tables. I wrote some general functions that would execute pass through queries and was going to call...
15
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? ...
1
by: Julia | last post by:
Hello there. I have a question somewhat related to this topic, and I don't know where else to go. I hope somebody can help. I've created a database in access, that I'd like to share with less...
2
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database,...
2
by: m23 | last post by:
Hi, I have an access database unfortunately still running under access 97. This contains a number of linked tables to another access 97 database. I was wandering if there is a way to edit...
3
by: paul321 | last post by:
Hello, I am using Access 2003 to link to a DB2 database. I have established the ODBC link successfully and can link to the DB2 database. However, when the Link Table window appears, I am not...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.