ACC97: TransferText Ignores Indexes in Import Specification

Last reviewed: March 4, 1998
Article ID: Q182002
The information in this article applies to:
  • Microsoft Access 97

SYMPTOMS

Advanced: Requires expert coding, interoperability, and multiuser skills.

When you import a text file by using the TransferText method or action with an import specification that applies indexes to a field, the resulting table does not contain the expected indexes.

RESOLUTION

Import the text file by using the Import Text Wizard and the appropriate import specification so that the expected indexes appear in the resulting table.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 97. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Access 97 and open the sample database Northwind.mdb.

  2. Export the Shippers table to a tab delimited text file named "Shippers.txt" (without the quotation marks) to drive C. Be sure to select the Include Field Names in First Row check box.

  3. On the File menu, point to Get External Data, and click Import.

  4. In the Import dialog box, click Text Files in the Files Of Type box; then locate the Shippers.txt file on drive C and double-click it.

  5. On the first screen of the Import Text Wizard, click Delimited, and then click Next.

  6. When asked to choose a delimiter, click Tab. Then select the First Row Contains Field Names check box and click Next twice.

  7. On the Field Options screen, click the ShipperID field and select Yes (No Duplicates) in the Indexed box. Click Next.

  8. In the Primary Key screen, click Choose My Own Primary Key and select ShipperID. Click Next.

  9. On the last screen of the Import Text Wizard, click Advanced.

  10. In the Shippers Import Specification dialog box, click Save As.

  11. In the Save Import/Export Specification dialog box, type "Shippers Spec" (without the quotation marks). Click OK.

  12. In the Shippers Spec dialog box, click OK.

  13. On the last screen of the Import Text Wizard, type "Shippers1" (without the quotation marks) in the Import To Table box. Click Finish.

  14. Open the Shippers1 table in Design view and note that the ShipperID field is the primary key.

Follow these steps to use the TransferText action to import the Shippers.txt file.

  1. In the Database window, select the Macros tab, and then click New.

  2. Create the following macro named mcrTestMacro:

          Action
          ------------
          TransferText
    

          TransferText Actions
          ---------------------------------
          Transfer Type: Import Delimited
          Specification Name: Shippers Spec
          Table Name: Shippers2
          File Name: C:\Shippers.txt
          Has Field Names: Yes
    
    

  3. Save the macro as mcrTextMacro.

  4. Run the macro, and then close it.

  5. Open the Shippers2 table in Design view and note that it does not contain a primary key.

  6. On the View menu, click Indexes. Note that the ShipperID field appears on the list of indexes, but its Unique property is set to No.


Additional query words: importing
Keywords : IsmSetup
Version : WINDOWS:97
Platform : WINDOWS
Hardware : x86
Issue type : kbbug
Solution Type : kbpending


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 4, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.