Docmd.TransferText问题问题、Docmd、TransferText

2023-09-08 11:25:03 作者:出了名的野

b'h

我会编程方式导入文本文件到表。我已保存的导入步骤。我会用这样的:

i will be programmatically importing a text file into a table. i have saved the import steps. i will use this:

DoCmd.TransferText(TransferType, SpecificationName, TableName, FileName, HasFieldNames, HTMLTableName, CodePage)

做进口。

这是什么 SpecificationName 表示:

规范名称为组选项,用于确定一个文本文件导入,导出,或链接的规范名称。对于固定宽度的文本文件,则必须指定一个规范名称或使用schema.ini文件,应保存在同一目录中导入,链接,或导出的文本文件。

Specification Name The specification name for the set of options that determines how a text file is imported, exported, or linked. For a fixed-width text file, you must either specify a specification name or use a schema.ini file, which should be stored in the same directory as the imported, linked, or exported text file.

我需要一个具体的规范。但是我不知道如何指定一个。当我手动导入的表,我也保存了规范我的进口,但是我不知道怎么称呼这在 TransferText

i do need a specific specification; however i do not know how to specify one. when i manually imported a table, i did save the specifications for my import, however i do not know how to call this in the TransferText.

没有人知道如何指定 SpecificationName

推荐答案

在做手工导入,可以节省导入选项作为规范。您分配一个名称,规格在创建它的时间。在Access 2003中,点击的导入文本中的高级的按键精灵的。然后,你将获得℃的对话框; 文件名>导入规范的;点击另存为的按钮,并指定一个的规范名称的......比如MySpec。

When you do the import manually, you can save the import options as a specification. You assign a name to the specification at the time you create it. In Access 2003, click the Advanced button on the Import Text Wizard. Then you will get a dialog for <filename> Import Specification; click the Save As button and assign a Specification Name ... for example "MySpec".

使用该名称(以引号)作为的 SpecificationName 的选项为您的 DoCmd.TransferText 的命令。

Use that name (in quotes) as the SpecificationName option for your DoCmd.TransferText command.