dbTalk Databases Forums  

Importing CSV Files with no headers

comp.databases.ms-access comp.databases.ms-access


Discuss Importing CSV Files with no headers in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
musicloverlch
 
Posts: n/a

Default Importing CSV Files with no headers - 03-07-2011 , 10:24 AM






I am importing a large CSV file into a table called "FUND" (I didn't
name it.) When I do it using the import wizard it works fine. It has
no headers. When I try to do it with a command it says "Field FI
doesn't exist in destination table 'FUND.'"

This is the line that generates the error:

DoCmd.TransferText acImportDelim, , "FUND", strSaveFileName, False

When I try to add import specifications it says "Invalid Argument".

I need these CSV files to import. HELP!

Thanks
:-)

Reply With Quote
  #2  
Old   
musicloverlch
 
Posts: n/a

Default Re: Importing CSV Files with no headers - 03-07-2011 , 10:45 AM






OK, I found a KB article about how it needs an import specification.
So now my problem is when I use this:

DoCmd.TransferText acImportDelim, strImportSpecs, "FUND",
strSaveFileName, False

It says "Invalid Augument"


On Mar 7, 10:24*am, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Quote:
I am importing a large CSV file into a table called "FUND" (I didn't
name it.) *When I do it using the import wizard it works fine. It has
no headers. *When I try to do it with a command it says "Field FI
doesn't exist in destination table 'FUND.'"

This is the line that generates the error:

DoCmd.TransferText acImportDelim, , "FUND", strSaveFileName, False

When I try to add import specifications it says "Invalid Argument".

I need these CSV files to import. HELP!

Thanks
:-)

Reply With Quote
  #3  
Old   
Access Developer
 
Posts: n/a

Default Re: Importing CSV Files with no headers - 03-07-2011 , 10:59 AM



What version of Access? How did you generate the Import Spec? Details of
that have changed from version-to-version and it is not easy to get detailed
information (as you have already obviously discovered). When I last did any
significant importing on a regular basis (using Access 2003), I was working
with fixed-field input but the input tended to vary slightly each month, and
it was, indeed, quite irritating to have to explore it and use the Wizard to
try to correct it.

Larry Linson
Microsoft Office Access MVP




"musicloverlch" <lhowey (AT) gmail (DOT) com> wrote


OK, I found a KB article about how it needs an import specification.
So now my problem is when I use this:

DoCmd.TransferText acImportDelim, strImportSpecs, "FUND",
strSaveFileName, False

It says "Invalid Augument"


On Mar 7, 10:24 am, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Quote:
I am importing a large CSV file into a table called "FUND" (I didn't
name it.) When I do it using the import wizard it works fine. It has
no headers. When I try to do it with a command it says "Field FI
doesn't exist in destination table 'FUND.'"

This is the line that generates the error:

DoCmd.TransferText acImportDelim, , "FUND", strSaveFileName, False

When I try to add import specifications it says "Invalid Argument".

I need these CSV files to import. HELP!

Thanks
:-)

Reply With Quote
  #4  
Old   
musicloverlch
 
Posts: n/a

Default Re: Importing CSV Files with no headers - 03-09-2011 , 09:15 AM



Hi!

I just tried another table and I am getting the same result. I am
using Access 2007, but the db is in Access 2002/2003 format. I
generated the Import Spec when I manually imported the CSV file into
the table (which it did with no errors).

I guess I'll try putting it in a temp table and then adding it to the
regular table.

Thanks,
Laura



On Mar 7, 10:59*am, "Access Developer" <accde... (AT) gmail (DOT) com> wrote:
Quote:
What version of Access? *How did you generate the Import Spec? *Details of
that have changed from version-to-version and it is not easy to get detailed
information (as you have already obviously discovered). *When I last did any
significant importing on a regular basis (using Access 2003), I was working
with fixed-field input but the input tended to vary slightly each month, and
it was, indeed, quite irritating to have to explore it and use the Wizardto
try to correct it.

* Larry Linson
* Microsoft Office Access MVP

"musicloverlch" <lho... (AT) gmail (DOT) com> wrote in message

news:eed94735-4905-41d8-b983-c779920f8f4c (AT) z27g2000prz (DOT) googlegroups.com...

OK, I found a KB article about how it needs an import specification.
So now my problem is when I use this:

DoCmd.TransferText acImportDelim, strImportSpecs, "FUND",
strSaveFileName, False

It says "Invalid Augument"

On Mar 7, 10:24 am, musicloverlch <lho... (AT) gmail (DOT) com> wrote:



I am importing a large CSV file into a table called "FUND" (I didn't
name it.) When I do it using the import wizard it works fine. It has
no headers. When I try to do it with a command it says "Field FI
doesn't exist in destination table 'FUND.'"

This is the line that generates the error:

DoCmd.TransferText acImportDelim, , "FUND", strSaveFileName, False

When I try to add import specifications it says "Invalid Argument".

I need these CSV files to import. HELP!

Thanks
:-)- Hide quoted text -

- Show quoted text -

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.