ACC2000: Error When You Try to Use Schema.ini to Import or Export with the TransferText Method (241477)
The information in this article applies to:
This article was previously published under Q241477 This article applies only to a Microsoft Access database (.mdb).
Advanced: Requires expert coding, interoperability, and multiuser skills.
SYMPTOMS
When you use the TransferText method to import or export a text file, you may receive the following error message:
Run-time error '2511':
The action or method requires a Specification Name argument.
Run-time error '3625':
The text file specification 'C:My DocumentsSchema.ini' does not exist. You cannot import, export, or link using the specification.
RESOLUTION
Use the Data Access Object (DAO) Execute method to import the text file. You can instruct this method to use the Text ISAM driver. This driver is designed to automatically use a Schema.ini file, as long as the file resides in the same folder as the text file.
Sub ImportSchemaTable()
Dim db As DAO.Database
Set db = CurrentDb()
db.Execute _
"SELECT * INTO NewContact FROM [Text;FMT=Delimited;HDR=Yes;DATABASE=C:\My documents;].[Contacts#txt];", _
dbFailOnError
db.TableDefs.Refresh
End Sub
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. REFERENCESFor more information about the TransferText action or method, click Microsoft Visual Basic Help on the Help menu, type TransferText in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 12/12/2002 |
---|
Keywords: | kbbug kbdta kberrmsg KB241477 |
---|
|