Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Having Delimited Import problems


Message #1 by "Mike McCrossin" <mike_mccrossin@h...> on Tue, 11 Sep 2001 12:46:03 -0700
Sorry about sending two messages. My finger slipped or something and sent 

the first one before I was finished. Anyway here is the information I 

need:



Summary: I am trying to import a delimited text file into an exisiting MS Access 97 table. 



The exisiting MS Access 97 table is "tblAccountDetailData"



The delimited text file to import is "Detail2.txt" 



The statement I am tryiing to use is as follows:

DoCmd.TransferText acImportDelim, , "tblAccountDetailData", C:\Streator\Detail2.txt" 



The error that I am getting is that the fields in the text file do not match the fields in the MS Access table.



The error message displayed is:

       Field "F1" doesn't exist in destination table "tblAccountDetailData"



Now it was my understanding that when importing a delimited file the fields would match up field to field so I don't know why it is
labeling the text file with a field "F1" or why the name should matter.  I don't have any fields declared in the text file. It is
just a text file with data rows delimited by commas.  Any help my friends can give me is welcomed. 



The table specification of "tblAccountDetailData" is as follows:

     Date               Number(long)           4

     AccountNum         Number (double)        8

     Reference          Text                   6

     PointsEarned       Number (Double)        8

     TransType          Text                   1

     BonusPoints        Number (Double         8

Sample rows of the text file Detail2.txt is as follows: 08062001,115100,,1028,,P

08062001,160720,,521,,P

08062001,160725,,228,,P

08062001,162040,,349,,P

that is all for now...MikeMc 
Message #2 by Brian Skelton <brian.skelton@b...> on Tue, 11 Sep 2001 23:32:47 +0100
Hi Mike



This is a painful problem introduced with Access 97 - Version 2 worked fine.



The easiest solution is to ensure that all your data files have header rows and the the header rows match the field names in your
table.



Alternatively, you need to set up an import specification. Look up article ID: Q142186 in the Microsoft knowledge Base for more
details.



-BDS

-----Original Message-----

From:	Mike McCrossin [SMTP:mike_mccrossin@h...]

Sent:	11 September 2001 20:46

To:	Access

Subject:	[access] Having Delimited Import problems



Sorry about sending two messages. My finger slipped or something and sent 

the first one before I was finished. Anyway here is the information I 

need:



Summary: I am trying to import a delimited text file into an exisiting MS Access 97 table. 



The exisiting MS Access 97 table is "tblAccountDetailData"



The delimited text file to import is "Detail2.txt" 



The statement I am tryiing to use is as follows:

DoCmd.TransferText acImportDelim, , "tblAccountDetailData", C:\Streator\Detail2.txt" 



The error that I am getting is that the fields in the text file do not match the fields in the MS Access table.



The error message displayed is:

       Field "F1" doesn't exist in destination table "tblAccountDetailData"



Message #3 by "Chris Kryshtalowych" <ckryshtalowych@u...> on Wed, 12 Sep 2001 09:15:11 -0400



Hi Mike,



Well, if you're table specs and sample data are accurate, then the problem is

that you're trying to stick the letter "P" in the field BonusPoints.



According to the specs you provided, the sample data



08062001,115100,,1028,,P



would import into the following fields:



Date = 8062001 (looses leading zero)

AccountNum = 115100

Reference =  "" (empty string, no data between these commas)

PointsEarned = 1028

TransType = "" (empty string, no data between these commas)

BonusPoints = YIKES! (it's trying to put the letter "P" in

              here, but this field is defined as a Double!)



You're going to need one of two things to import this data:  either add a row at

the top of each text file with a list of field names that exactly match the

field names in your table AND are comma-delimited, or create an import

specification, which takes a little more time to set up, but can then be used

over and over and over again.



Hope that helps.  Please respond to the list if you need more info, or if I've

completely misunderstood your question.



Chris "who would want a P stuck in their BonusPoints, anyway?" Kryshtalowych

Systems Specialist

University Healthcare System

Augusta, Georgia



***Here's what you said about this fascinating topic:***

{snip}

>Subject: Having Delimited Import problems

>From: "Mike McCrossin" <mike_mccrossin@h...>

>Date: Tue, 11 Sep 2001 12:46:03 -0700

>X-Message-Number: 6

>

>

>The error message displayed is:

>       Field "F1" doesn't exist in destination table

>       "tblAccountDetailData"

>

>Now it was my understanding that when importing a delimited

>file the fields would match up field to field so I don't know

>why it is labeling the text file with a field "F1" or why the

>name should matter.  I don't have any fields declared in the

>text file. It is just a text file with data rows delimited

>by commas.  Any help my friends can give me is welcomed.

>

>The table specification of "tblAccountDetailData" is

>as follows:

>  Date            Number(long)        4

>  AccountNum      Number (double)     8

>  Reference       Text                6

>  PointsEarned    Number (Double)     8

>  TransType       Text                1

>  BonusPoints     Number (Double)     8

>Sample rows of the text file Detail2.txt is as follows:

>08062001,115100,,1028,,P

>08062001,160720,,521,,P

>08062001,160725,,228,,P

>08062001,162040,,349,,P

>that is all for now...MikeMc

{/snip}





Message #4 by "Mike McCrossin" <mike_mccrossin@h...> on Wed, 12 Sep 2001 06:24:26 -0700
Thanks so far for your answers. 



If the import specification name were CMAspecs



then would the statement line be



DoCmd.TransferText acImportDelim, CMAspecs, "tblAccountDetailData",

C:\Streator\Detail2.txt"



that is all for now...MikeMc 

 



>From: "Mike McCrossin" 



>Reply-To: "Access" 

>To: "Access" 

>Subject: [access] Having Delimited Import problems 

>Date: Tue, 11 Sep 2001 12:46:03 -0700 

> 

>Sorry about sending two messages. My finger slipped or something and sent 

>the first one before I was finished. Anyway here is the information I 

>need: 

> 

>Summary: I am trying to import a delimited text file into an exisiting MS Access 97 table. 

> 

>The exisiting MS Access 97 table is "tblAccountDetailData" 

> 

>The delimited text file to import is "Detail2.txt" 

> 

>The statement I am tryiing to use is as follows: 

>DoCmd.TransferText acImportDelim, , "tblAccountDetailData", C:\Streator\Detail2.txt" 

> 

>The error that I am getting is that the fields in the text file do not match the fields in the MS Access table. 

> 

>The error message displayed is: 

> Field "F1" doesn't exist in destination table "tblAccountDetailData" 

> 

>Now it was my understanding that when importing a delimited file the fields would match up field to field so I don't know why it
is labeling the text file with a field "F1" or why the name should matter. I don't have any fields declared in the text file. It is
just a text file with data rows delimited by commas. Any help my friends can give me is welcomed. 

> 

>The table specification of "tblAccountDetailData" is as follows: 

> Date Number(long) 4 

> AccountNum Number (double) 8 

> Reference Text 6 

> PointsEarned Number (Double) 8 

> TransType Text 1 

> BonusPoints Number (Double 8 

>Sample rows of the text file Detail2.txt is as follows: 08062001,115100,,1028,,P 

>08062001,160720,,521,,P 

>08062001,160725,,228,,P 

>08062001,162040,,349,,P 

>that is all for now...MikeMc 

  Return to Index