"Invalid Argument"

A

Adam Knapp

Hello-

I did what John Nurik Said to do to solve the "Invalid
Argument" error. I downloaded and installed both Service
Release 1/1a and SP3. I still get the "Invalid Argument"
error when trying to import, as well as modifying anything
in the database file that gets the error. Are there any
more suggestions??

Thanks for your time.

Adam


John wrote:

Hi Adam,

This probably means you need to update your Office
installation to
Service Release 1/1a. See
http://support.microsoft.com/default.aspx?scid=kb;en-
us;302495

SR1/1A is available from
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;245025

One that's installed you can also install later service
packs. The most
recent is SP3,
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;326585

Hello-

I was wondering if anybody can tell me why I'm getting
an "Invalid Argument" error when trying to import text
files into a database. Sometimes it works and sometimes
it doesn't. I'm using a macro to run my imports
everynight.

It just gives me an error "Invalid Argument" and then
doesn't allow me to import.

It then has a window titled "Action failed." In this
window it tells me my macro name, Condition (True), Action
Name (Transfer Text), and then Agurments (0, "Text File
Name" Import Specification, "Text File Name", "Text File
Path", No, , )

I'm importing about 15 very large text files into an
Access 2000 database.

Can anybody help me?

Thanks.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
..
 
E

Eric I

Adam,

I recently started having problems with "invalid argument"
errors in relinking code I've had running for a long
time. I haven't made any changes to the code, but I
updated to Windows 2000 sp4 and I recently updated MS
Access with one of the support uploads. I have all
current MS Office and Windows 2000 patches applied.
Anyway, I determined that I receive the invalid argument
error when my connection string for local tables ends in a
semi-colon. This didn't raise an error before but is now
raising the 3001 error (invalid argument).

Here was my connection string when I was getting the error
(which previously worked under different Access/Windows
2000 patches and service packs):

sConnection=;Database=\\ei40\BackEnd.mdb;

Here is how I stopped receiving the error:

sConnection=";Database=\\ei40\BackEnd.mdb"

Note that the only difference between the connection
strings is the ending semi-colon.

Anyway, I'm not certain if this is related to the problem
you are having, but I found it rather interesting and
thought it just might be related.





-----Original Message-----
Hello-

I did what John Nurik Said to do to solve the "Invalid
Argument" error. I downloaded and installed both Service
Release 1/1a and SP3. I still get the "Invalid Argument"
error when trying to import, as well as modifying anything
in the database file that gets the error. Are there any
more suggestions??

Thanks for your time.

Adam


John wrote:

Hi Adam,

This probably means you need to update your Office
installation to
Service Release 1/1a. See
http://support.microsoft.com/default.aspx?scid=kb;en-
us;302495

SR1/1A is available from
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;245025

One that's installed you can also install later service
packs. The most
recent is SP3,
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;326585

Hello-

I was wondering if anybody can tell me why I'm getting
an "Invalid Argument" error when trying to import text
files into a database. Sometimes it works and sometimes
it doesn't. I'm using a macro to run my imports
everynight.

It just gives me an error "Invalid Argument" and then
doesn't allow me to import.

It then has a window titled "Action failed." In this
window it tells me my macro name, Condition (True), Action
Name (Transfer Text), and then Agurments (0, "Text File
Name" Import Specification, "Text File Name", "Text File
Path", No, , )

I'm importing about 15 very large text files into an
Access 2000 database.

Can anybody help me?

Thanks.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
..


.
 
E

EricI

Adam,

I spoke too soon. The semi-colon did not fix the
problem. I'm still having these problems come up but it
does appear to be the related to the semi-colon in the
connection string. In the code that's breaking on me, the
code that links a table to a local MDB files is no longer
working but linking to an ODBC (SQL Server) source is
still working fine. They use roughly the same code to
link. The only difference was the connection string.
I'll post more if I find a solution. Again, the only
thing that seems to have changed on my machine is the
Access service pack I applied and Windows 2000 sp4. They
seem to be the triggers that started causing this code to
break.

-Eric
 
J

John Nurick

Hi Adam,

In your first message you wrote
I don't normally use macros and am not familiar with the error messages
they may produce, but this doesn't make sense to me. The arguments for
the TransferText macro action are
Transfer Type (e.g. "Import Delimited")
Specification Name (e.g. "My Specification"
Table Name (e.g. "New Table")
File Name (e.g. "C:\Folder\File.txt")
Has Field Names (Yes or No)
HTML Table Name (not needed for textfiles)
Code Page (not usually needed)

and I can't reconcile these with the arguments you list. So could there
actually be something going wrong with your arguments when the macro
runs? What happens if you open the Immediate pane and try running
DoCmd.TransferText with the same arguments?

Also, do you find that smaller files import OK but larger ones are more
likely to fail?



Hello-

I did what John Nurik Said to do to solve the "Invalid
Argument" error. I downloaded and installed both Service
Release 1/1a and SP3. I still get the "Invalid Argument"
error when trying to import, as well as modifying anything
in the database file that gets the error. Are there any
more suggestions??

Thanks for your time.

Adam


John wrote:

Hi Adam,

This probably means you need to update your Office
installation to
Service Release 1/1a. See
http://support.microsoft.com/default.aspx?scid=kb;en-
us;302495

SR1/1A is available from
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;245025

One that's installed you can also install later service
packs. The most
recent is SP3,
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;326585

Hello-

I was wondering if anybody can tell me why I'm getting
an "Invalid Argument" error when trying to import text
files into a database. Sometimes it works and sometimes
it doesn't. I'm using a macro to run my imports
everynight.

It just gives me an error "Invalid Argument" and then
doesn't allow me to import.

It then has a window titled "Action failed." In this
window it tells me my macro name, Condition (True), Action
Name (Transfer Text), and then Agurments (0, "Text File
Name" Import Specification, "Text File Name", "Text File
Path", No, , )

I'm importing about 15 very large text files into an
Access 2000 database.

Can anybody help me?

Thanks.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
A

Adam

John-

The main problem is that these files have imported fine
the first couple of times I do it, then I recieve the
error.

I have two macros. One that deletes all of the tables in
the morning, and the other creates all of the tables from
importing the text files. These run everynight. After
the first three nights, I start receiving this error. I'm
even unable to edit the macro because of this error. It's
like the database is on lock down.

And yes, the error does happen when a large file is being
imported. These are very large text files, again they
have worked before, and continue to work if I just do it a
couple of times in a new database, but I would like to use
the same database file.

Thanks for your time.

Adam
-----Original Message-----
Hi Adam,

In your first message you wrote
I don't normally use macros and am not familiar with the error messages
they may produce, but this doesn't make sense to me. The arguments for
the TransferText macro action are
Transfer Type (e.g. "Import Delimited")
Specification Name (e.g. "My Specification"
Table Name (e.g. "New Table")
File Name (e.g. "C:\Folder\File.txt")
Has Field Names (Yes or No)
HTML Table Name (not needed for textfiles)
Code Page (not usually needed)

and I can't reconcile these with the arguments you list. So could there
actually be something going wrong with your arguments when the macro
runs? What happens if you open the Immediate pane and try running
DoCmd.TransferText with the same arguments?

Also, do you find that smaller files import OK but larger ones are more
likely to fail?



Hello-

I did what John Nurik Said to do to solve the "Invalid
Argument" error. I downloaded and installed both Service
Release 1/1a and SP3. I still get the "Invalid Argument"
error when trying to import, as well as modifying anything
in the database file that gets the error. Are there any
more suggestions??

Thanks for your time.

Adam


John wrote:

Hi Adam,

This probably means you need to update your Office
installation to
Service Release 1/1a. See
http://support.microsoft.com/default.aspx?scid=kb;en-
us;302495

SR1/1A is available from
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;245025

One that's installed you can also install later service
packs. The most
recent is SP3,
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;326585

Hello-

I was wondering if anybody can tell me why I'm getting
an "Invalid Argument" error when trying to import text
files into a database. Sometimes it works and sometimes
it doesn't. I'm using a macro to run my imports
everynight.

It just gives me an error "Invalid Argument" and then
doesn't allow me to import.

It then has a window titled "Action failed." In this
window it tells me my macro name, Condition (True), Action
Name (Transfer Text), and then Agurments (0, "Text File
Name" Import Specification, "Text File Name", "Text File
Path", No, , )

I'm importing about 15 very large text files into an
Access 2000 database.

Can anybody help me?

Thanks.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
J

John Nurick

The main problem is that these files have imported fine
the first couple of times I do it, then I recieve the
error.

I have two macros. One that deletes all of the tables in
the morning, and the other creates all of the tables from
importing the text files. These run everynight. After
the first three nights, I start receiving this error.

Are you compacting the database between times? If not, try doing so. If
these really are large files (see below) you could be hitting the size
limit on the mdb file.
I'm
even unable to edit the macro because of this error. It's
like the database is on lock down.

And yes, the error does happen when a large file is being
imported. These are very large text files, again they
have worked before, and continue to work if I just do it a
couple of times in a new database, but I would like to use
the same database file.

You say they "have worked before" - but if you keep importing them
they're presumably different files. Can you rule out the possibility of
irreegularities in the text files themselves.

By the way, how large is "very largeW"? For different people it can mean
anything from 100kB to 1GB.

Also, if you're importing the data and then deleting it, why not just
link the textfiles instead. Does that work any better?
Thanks for your time.

Adam
-----Original Message-----
Hi Adam,

In your first message you wrote
It then has a window titled "Action failed." In this
window it tells me my macro name, Condition (True), Action
Name (Transfer Text), and then Agurments (0, "Text File
Name" Import Specification, "Text File Name", "Text File
Path", No, , )

I don't normally use macros and am not familiar with the error messages
they may produce, but this doesn't make sense to me. The arguments for
the TransferText macro action are
Transfer Type (e.g. "Import Delimited")
Specification Name (e.g. "My Specification"
Table Name (e.g. "New Table")
File Name (e.g. "C:\Folder\File.txt")
Has Field Names (Yes or No)
HTML Table Name (not needed for textfiles)
Code Page (not usually needed)

and I can't reconcile these with the arguments you list. So could there
actually be something going wrong with your arguments when the macro
runs? What happens if you open the Immediate pane and try running
DoCmd.TransferText with the same arguments?

Also, do you find that smaller files import OK but larger ones are more
likely to fail?



Hello-

I did what John Nurik Said to do to solve the "Invalid
Argument" error. I downloaded and installed both Service
Release 1/1a and SP3. I still get the "Invalid Argument"
error when trying to import, as well as modifying anything
in the database file that gets the error. Are there any
more suggestions??

Thanks for your time.

Adam


John wrote:

Hi Adam,

This probably means you need to update your Office
installation to
Service Release 1/1a. See
http://support.microsoft.com/default.aspx?scid=kb;en-
us;302495

SR1/1A is available from
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;245025

One that's installed you can also install later service
packs. The most
recent is SP3,
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;326585

On Mon, 7 Jul 2003 08:07:22 -0700, "Adam Knapp"
<[email protected]>
wrote:

Hello-

I was wondering if anybody can tell me why I'm getting
an "Invalid Argument" error when trying to import text
files into a database. Sometimes it works and sometimes
it doesn't. I'm using a macro to run my imports
everynight.

It just gives me an error "Invalid Argument" and then
doesn't allow me to import.

It then has a window titled "Action failed." In this
window it tells me my macro name, Condition (True),
Action
Name (Transfer Text), and then Agurments (0, "Text File
Name" Import Specification, "Text File Name", "Text File
Path", No, , )

I'm importing about 15 very large text files into an
Access 2000 database.

Can anybody help me?

Thanks.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
J

John Nurick

How do you compact the database? What do you mean by this?

See "Compact and repair an Access file" in Help. Compacting the database
recovers space used by objects and data that have been deleted, and
defragments the internal structure of the file. Continual importing and
deleting of data (or creating and deleting database objects) causes the
MDB file to "bloat", and compacting reduces it to a proper size.

I'm importing about 14 text files. My smallest is 8kb,
and my largest is 220MB

Remember that the total size of an MDB file cannot exceed 2GB (including
not just the data but system objects, overhead caused by the way Access
stores tables, indexes, and of course queries, reports, forms, macros
and modules). If the total size of your textfiles is more than about 1GB
you could well be hitting this limit at some stage, so you need to
exclude that possibility.
I'm unclear on linking. I'm not experience using access.
How would linking work?
is the text file to be put into a table on access. Will
linking do this?

Instead of using the TransferText macro action and the "Import
Delimited" argument to import the data, use TransferText with "Link
Delimited". In the user interface, use File|Get External Data|Link.

This creates a "linked table" in Access: in most ways it behaves exactly
like an ordinary table, but the data is not imported. Instead, the table
is literally linked to the textfile. When you delete a linked table, the
link is broken but the textfile is not affected.

For technical reasons, records in a table linked to a textfile cannot be
edited, but I have the impression that this will not be a problem for
you. Linking has the big advantage that you won't be importing huge
amounts of data into the textfile and then deleting it again, so "bloat"
and the 2GB limit should be much less of a problem.


John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 

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

Top