Writing a text file to an mdb

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a fairly large text file with data that I need to put into an Access
Database. The text file is not uniform and I have to read it line by line in
order to derive some of the fields. I then have to put the data into a
single table in an Access Database.

I've stored data in Access using Append Queries that I created in Access and
called from VB - but generally for only a small amount of data. I'm assuming
that if try to do this repeatedly for my current situation, this will be
horrbily inefficient.

Can someone point me to an example that I can look at to find a sensible way
to store this data? Oh, there will be 13 fields in each record.

Thanks,

Art
 
Art,

You can use a blob field (thread the textfile as if it was a picture).
Although that compressing from a picture in advance has no sense, can you
very much improve your database time and format to do that before with a
textfile.

In this sample from me is how you can do it with image fields. You can do
instead of a picture exactly the same with a textfile. The compression is
not in that because this is originally for pictures

The sample is complete except the use of the Database itself, therefore I
used XML datasets.

http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vb/msg/9bbd27ce29590856?hl=en

I hope this helps,

Cor
 
¤ Hi,
¤
¤ I have a fairly large text file with data that I need to put into an Access
¤ Database. The text file is not uniform and I have to read it line by line in
¤ order to derive some of the fields. I then have to put the data into a
¤ single table in an Access Database.
¤
¤ I've stored data in Access using Append Queries that I created in Access and
¤ called from VB - but generally for only a small amount of data. I'm assuming
¤ that if try to do this repeatedly for my current situation, this will be
¤ horrbily inefficient.
¤
¤ Can someone point me to an example that I can look at to find a sensible way
¤ to store this data? Oh, there will be 13 fields in each record.

When you say the text file is not uniform what do you mean? Does the text file have a delimiter of
some sort to separate the fields?


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top