Hi. I'm new to this board and have a few questions about using the
method referred to in the topic of this message.
I have manually transferred over 1/2 million records from a text file
into my Access table in under 1 minute, using File>Get External
Data>Import, then specifying .txt as the data source, selecting
the text file, and walking through the resulting Wizard.
I'm thinking I can do the same thing with DoCmd.TransferText, but
don't understand all the parameters. The basic format is:
DoCmd.TransferText (TransferType, SpecificationName, TableName,
FileName, HasFieldNames, HTMLTableName, CodePage)
Here's what I have so far:
DoCmd.TransferText(acImportDelim,, "MyTable", "Path to text file"). I
don't think I need any of the last parameters. When I exit this line
in my VB6 app, however, I get the error message, "Compile error.
Expected =".
I think the key is including the SpecificationName, which I don't
understand. Any ideas? If SpecificationName is a path to some file
with import specifications, could someone also please explain the
format of this file and include an example?
My table has three fields, all text type, the first field indexed, no
primary key (don't need one). My text file contains comma delimited
rows such as:
Row1Field1Value, Row1Field2Value, Row1Field3Value
Row2Field1Value, Row2Field2Value, Row2Field3Value
etc...
Like I said, this imports in less than a minute manually in Access,
and I'm thinking will do the same from with my VB app.
Thanks ahead for help.