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

URGENT !!!!!!!! wHAT ARE TRANSFER Specifications

271 views
Skip to first unread message

Jay Ainsworth

unread,
Oct 1, 1999, 3:00:00 AM10/1/99
to
I'm trying to transfer fixed text to an Access table but it keeps referring
to a specification file . I think I'm beginning to see what one is but how
do you create it and how do you save it so that it can be used in a VBA
command line?

Crying Wolf

unread,
Oct 2, 1999, 3:00:00 AM10/2/99
to
Hehehe, I was saying exactly what you are saying about a month ago. I
wanted to transfer text from a table, into an Ascii text file, to use
as a batch file. Thus enabling me to create a variable batch file from
code. But Access kept putting "" around the text, which was starting
to really piss me off! hehehe The help file info on this is really
confusing too, but eventually, after taking a long break I dug back
into it and figured it out. Here's what a transfer, actually an
Import/Export specification is. It is a 'template' or format that
Access uses to import or export Data. There is a default one that is
not named, if you just leave the argument blank, in code, then it will
use the default specification. However, if you don't like how the
default one operates, to create one is a little tricky. Well, it's not
really tricky, it's just wierd that they hid the process to do this so
deeply into a bunch of menus. First pick a table in your database
window, any table will do. Then right click on it, and select the Save
as /export command. On the next window that you are going to get, the
only IMPORTANT thing that you have to do, is select the export file
type as a .TXT text file type. Once you have selected that, it doesn't
matter where you put the export or what you name it, cause you aren't
really going to export it. Click Okay (Or next...I forget which it is)
On this NEXT menu, there is a button called ADVANCED. When you click
this button you will be brought to the Import/Export specification form
that let's you modify how access imports and exports. Change it to how
you want it to act, then SAVE the specification. Remember that name
though! (However, if you use that specification in a macro, it will
give you a drop down menu of all the specifications you have saved with
that database). Once it is saved, CLICK CANCEL until you just have the
Database Window closed. Now I must warn you, to make sure and click
Cancel, I had a problem where I made the exact same specification,
however one time I clicked cancel, and one time I just closed the
windows by clicking the X. The specification I got from clicking the X
kept kicking out an error that made no sense. I was exporting data to
a non existing file, it was supposed to create that file, but the code
kept telling me that the file didn't exist...well duh! it was supposed
to make it. Just a precaution, click CANCEL

Hope that helps

Crying Wolf
In article <7t3ets$8mg$1...@bgtnsc03.worldnet.att.net>,

--
He who learns but does not think is lost, he who thinks but does not lea


Sent via Deja.com http://www.deja.com/
Before you buy.

Deb Mallett

unread,
Oct 2, 1999, 3:00:00 AM10/2/99
to
Hi Jay,

To build text import specs:

- File, Get External Data, Import
- pick a text file
- click on Import (the wizard will come up)
- click on Advanced

Now you can build your spec and save it to a name you can use in
your VBA. You can use the same spec for any text file name (ie:
not just the one you picked above).

In Advanced you'll see a Specs button which will show you
all of your named specs. To do an export it's the same but you
use File, Save As/Export.

It's the only way I know of to get in there. I'm sure someone else
may have an easier way.

Deb Mallett

On Fri, 1 Oct 1999 18:14:21 -0500, "Jay Ainsworth"

vincent.quesnoit

unread,
Oct 2, 1999, 3:00:00 AM10/2/99
to
If you feel like playing with fire, the import specifications are in two
system tables.
These tables are named MSysIMEXColumns and MSysIMEXSpecs.
MSysIMEXSpecs has one record per import spec and contains the parameters of
the spec (FixedLength/delimited, Separator Field, .......).

MSysIMEXColumns has several records per Import spec, one for each imported
field. The two tables are linked by the specID field.
Once you have looked at what the import wizard does, you can open these
tables to see what the wizard did, and possibly trim the spec by hand.

To see the system table, you have to open the tools/options menu, and in a
tab that might be named "Display" (it is called "Affichage" in french) you
check "System Objects"

HTH,

Vincent


Deb Mallett a écrit dans le message <37f57f68...@news1.sympatico.ca>...
>Hi Jay,
>
<SNIP> >It's the only way I know of to get in there. I'm sure someone else

mark.phillipson

unread,
Oct 2, 1999, 3:00:00 AM10/2/99
to
Here is the SQL Text to create a select query (read only) of all the
Import/Export Specifications in the current DB. This works in Access 97.

SELECT MSysIMEXSpecs.SpecName AS Name, IIf([MSysIMEXSpecs]![SpecType]=0,"Ver
2.0",IIf([MSysIMEXSpecs]![SpecType]=1,"Delimited","Fixed")) AS Type,
IIf([MSysIMEXSpecs]![FileType]=0,"ANSI","DOS") AS Origin,
IIf([MSysIMEXSpecs]![FieldSeparator]="
","{Tab}",[MSysIMEXSpecs]![FieldSeparator]) AS Delimiter,
MSysIMEXSpecs.TextDelim AS [Text Del], Count(MSysIMEXColumns.FieldName) AS
Fields, IIf([MSysIMEXSpecs]![StartRow]=1,"Yes","No") AS Names
FROM MSysIMEXColumns INNER JOIN MSysIMEXSpecs ON MSysIMEXColumns.SpecID =
MSysIMEXSpecs.SpecID
GROUP BY MSysIMEXSpecs.SpecName, IIf([MSysIMEXSpecs]![SpecType]=0,"Ver
2.0",IIf([MSysIMEXSpecs]![SpecType]=1,"Delimited","Fixed")),
IIf([MSysIMEXSpecs]![FileType]=0,"ANSI","DOS"),
IIf([MSysIMEXSpecs]![FieldSeparator]="
","{Tab}",[MSysIMEXSpecs]![FieldSeparator]), MSysIMEXSpecs.TextDelim,
IIf([MSysIMEXSpecs]![StartRow]=1,"Yes","No")
ORDER BY MSysIMEXSpecs.SpecName;


Just copy the SQL text, and paste into a new query, save and view.

I hope you find this of some use as it took me a whole day to do.

Jay Ainsworth <Jay_Ai...@worldnet.att.net> wrote in message
news:7t3ets$8mg$1...@bgtnsc03.worldnet.att.net...

Deb Mallett

unread,
Oct 3, 1999, 3:00:00 AM10/3/99
to
Mark, this works very well. Thanks for posting it.

Deb Mallett

Terry Kreft

unread,
Oct 5, 1999, 3:00:00 AM10/5/99
to
... But the tables are read only. You can use a select query based on the
tables to edit them directly though.

e.g.
select * from msysimexcolumns
and
select * from msysimexspecs

(you don't need to make the tables visible for this to work either).

but as Vincent says, "playing with fire ..."


vincent.quesnoit <vincent....@wanadoo.fr> wrote in message
news:7t4kao$5og$1...@wanadoo.fr...

hz...@my-deja.com

unread,
Oct 6, 1999, 3:00:00 AM10/6/99
to
I am a novice Access user (Acc97). Our office recently converted a lot
of 2.0 db's into 97. We are now having a problem (i.e. getting error
3170 -- couldn't find an installable ISAM) whenever we hit a transfer
text command.

All of this is beyond my expertise, so any help in figuring out why this
error is occurring (I believe that the specification name may be
pointing to an old 2.0 db table that has since been archived, but I
don't know) and also how to correct this error is greatly appreciated!

TIA,
Heather

In article <7t3ets$8mg$1...@bgtnsc03.worldnet.att.net>,
"Jay Ainsworth" <Jay_Ai...@worldnet.att.net> wrote:

> I'm trying to transfer fixed text to an Access table but it keeps
referring
> to a specification file . I think I'm beginning to see what one is but
how
> do you create it and how do you save it so that it can be used in a
VBA
> command line?
>
>

hz...@my-deja.com

unread,
Oct 6, 1999, 3:00:00 AM10/6/99
to
In article <7tfnal$s16$1...@nnrp1.deja.com>,

hz...@my-deja.com wrote:
> I am a novice Access user (Acc97). Our office recently converted a
lot
> of 2.0 db's into 97. We are now having a problem (i.e. getting error
> 3170 -- couldn't find an installable ISAM) whenever we hit a transfer
> text command.
>
> All of this is beyond my expertise, so any help in figuring out why
this
> error is occurring (I believe that the specification name may be
> pointing to an old 2.0 db table that has since been archived, but I
> don't know) and also how to correct this error is greatly
appreciated!
>
> TIA,
> Heather
>

The ISAM problem has been fixed and that seemed to take care of the
transfertext error, but I would still like to know how to modify a spec
name.

Thanks,
H

Gregory Scott

unread,
Oct 8, 1999, 3:00:00 AM10/8/99
to
Heather hz...@my-deja.com wrote:
> The ISAM problem has been fixed and that seemed to take care of the
> transfertext error, but I would still like to know how to modify a spec

The only way I know is to go through the Import process, select a text file
then somwhere there is an Advanced or Options button, which will allow you
to load and modify an import specification.


Gregory Scott
Lion Software
Dunedin, New Zealand

Making Computers Friendly

0 new messages