473,399 Members | 3,919 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,399 software developers and data experts.

Best Way to Import Fixed Width Files

I am looking for suggestions on the most efficient way to import 7
different fixed width files into a DataSet. Not all at the same time.
One file at a time, but the format could change from file to file.

I have 7 (and more coming) different fixed width files that my clients
provide to me, within each one the field sizes and ordering is slightly
different...maddening I know.

Each file could possibly be as large as 150 MG with around 70,000
records in them.

I need to be able to import these files into a DataSet so I can do
further requirements/validation checking on certain fields.

I've looked at FileHelpers (http://filehelpers.sf.net) and
TextFileParser and neither one will do what I need to do.

Any suggestions?

Mar 8 '06 #1
4 3942
I would use the Microsoft OLE Text Driver.

Mar 8 '06 #2

"BostonNole" <bo********@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
I am looking for suggestions on the most efficient way to import 7
different fixed width files into a DataSet. Not all at the same time.
One file at a time, but the format could change from file to file.


Do you have MS Access? That would be my first goto.

Mar 9 '06 #3
BostonNode,

As it is done from the first time the Mid method exist.

Create your dataset and read the files where you using Mid put the right
parts in the right parts from the datasets.

This is all information I can give based on your description from your
problem.

Cor
Mar 9 '06 #4

the answer depends on the situation ( that you not fully describe )

1. if this is a one time operation i would use Access for this , as it
has all sorts of nice wizzards to import data from different sources ,
especially text with even the ability to save the import specifications
and automate the hole process from VBA

2. if you want the fastest way , and this is occuring frequently ,,,, i
would write my own data import routine i have once written a Mysql dump
import class in VB.Net with filestreams and a stringbuilder that was capable
of importing and converting a flat file Mysql dump of 7,5 GB ( giga
bytes !!! ) to MS SQL in only + 20 minutes

Ofcourse honestly needs to say that this was a client server proggy design
where the server was a Poweredge 4600 ;-) the client was a AMD XP 2400+
( standard pc with 512 MB ) wich was actually performing the conversion to
the SQL server with batches of 1000 records in one time

So lightening speed , but also a bit work to write go for your own import
routine
regards

Michel Posseth [MCP]


"BostonNole" <bo********@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
I am looking for suggestions on the most efficient way to import 7
different fixed width files into a DataSet. Not all at the same time.
One file at a time, but the format could change from file to file.

I have 7 (and more coming) different fixed width files that my clients
provide to me, within each one the field sizes and ordering is slightly
different...maddening I know.

Each file could possibly be as large as 150 MG with around 70,000
records in them.

I need to be able to import these files into a DataSet so I can do
further requirements/validation checking on certain fields.

I've looked at FileHelpers (http://filehelpers.sf.net) and
TextFileParser and neither one will do what I need to do.

Any suggestions?

Mar 9 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Paulo Jan | last post by:
Hi all: Let's say I'm designing a database (Postgres 7.3) with a list of all email accounts in a certain server: CREATE TABLE emails ( clienteid INT4, direccion VARCHAR(512) PRIMARY KEY,...
5
by: kk | last post by:
Hello, I am using the udb 8.1 task scheduler to schedule a load. Is there any way to also schedule an OS command (win32) to delete the file after the load? I have a python script that will do...
1
by: mark | last post by:
In Access 2000 and 2002, I have created an import specification to import the fixed-width recordset below into an existing table. I am having strange problems with the import of the date and time...
5
by: Johnny Meredith | last post by:
I have seven huge fixed width text file that I need to import to Access. They contain headers, subtotals, etc. that are not needed. There is also some corrupt data that we know about and can...
2
by: Oliver | last post by:
Hi all. Using Access 2000. Trying to import fixed width file that has column headings that I want to becom field names - it's not an option :( Is there a way to achieve this? Thanks Oliver
10
by: Avi | last post by:
Hi I need to read in a large set of text files (9GB+ each) into a database table based on fixed width lengths. There are several ways to complete this, but I am wondering if anyone has...
10
by: BostonNole | last post by:
Using Visual Studio 2005, .NET 2.0 and VB.NET: I am looking for the fastest possible way to import a very large fixed width file (over 6 million records and over 1.2 GB file size) into a...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
4
by: Alvin SIU | last post by:
Hi all, I have 6 tables inside a MS Access 2003 mdb file. I want to convert them as DB2 version -8 tables in AIX 5.2. I have exported them as 6 XML files. The XML files look fine. Each...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
0
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...

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.