Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TransferText (Importing data into a table)

0 views
Skip to first unread message

Hace

unread,
Jun 26, 1998, 3:00:00 AM6/26/98
to

Hello all,

Problem:
I want to automate the importing of a textfile into an existing table.
The user should simply be able to push a button, and the importing of
the txt-data into the table should then be done.

I found out that I should use the TransferText method, but now I am
running into a problem. .

Every month a new textfile comes in, it is fixed-length, and I want to
import this textfile into a LINKED table. That is, the table that the
data should be imported into, is in another (access-)database. My form
with my button is here, but my data is there.

Now the problem is that I cannot use the "data-specification", because
the import-specification is in the other database (where the linked
table points to). I need the specification because the data is
delivered as fixth lenght. In the help it tells me:
==
specificationname A string expression that's the name of an
import or export specification you've created and saved in the current
database.
==
well that's the problem, I created the specification in the other
database :-)

Can I somehow do the importing in the other database but still start
the procedure in the original database?

Thanks in advance for any help!
Melle

Rob Salsgiver

unread,
Jun 26, 1998, 3:00:00 AM6/26/98
to

You are on the right track, but you do need the import spec in the database
your are doing the import from. You can view the database which has the
import/export specs in it by showing the system objects in TOOLS | OPTIONS
| VIEW tab. There are 2 tables under Access 97 which contain the data.
You can potentially transfer your import/export spec by copying records,
etc, but I would not recommend doing it this way... you have a very good
chance of messing up your database if you poke around in those tables
without good knowledge of the impact. An easier way is as follows:

Open up the database with the I/E spec. Go to import a TEXT file. (it
doesn't matter if it is a valid data file or not). Open your I/E spec.
when all of the fields show on the screen, highlight the rows of the I/E
spec. While the rows are highlighted, press CTRL and C (to copy).

Get all the way out of that database and into the DB you want to insert the
I/E spec into. Repeat the same steps to get to the I/E spec screen.
Highlight row #1 and press CTRL and V. (to paste). Save the I/E spec with
the proper name.

Done. Hope that helps.

Hace <Ha...@casema.net> wrote in article
<3593759f...@news.worldonline.nl>...
>
> Hello all,
>

Mike Self

unread,
Jun 27, 1998, 3:00:00 AM6/27/98
to

Put the spec in the database with the code/importing procedure.

Access lets you append imported data to an attached table. Only stipulation
is that the spec matches the data.

Mike Self
ms...@msn.com


Hace wrote in message <3593759f...@news.worldonline.nl>...

0 new messages