ACC: Exporting to SQL Server Does Not Create Indexes

Last reviewed: May 27, 1997
Article ID: Q90149
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

Microsoft Access allows you to export data to SQL Server back ends. However, Microsoft Access does not build the index on export. This may create potential problems and confusion. For example, if you then link (attach) the table, updates are not allowed and the data is displayed as read-only in Datasheet or Form view.

CAUSE

Microsoft Access can update a linked SQL Server table only if the table has a unique index. However, Microsoft Access does not build indexes on the SQL Server table when exporting information.

RESOLUTION

In Microsoft Access versions 1.0, 1.1 and 2.0, you can create indexes on exported SQL Server tables manually. After the indexes are created, attach (or re-attach) the tables.

In Microsoft Access 7.0 and 97 you are asked to optionally create a unique index when linking to an SQL Server table that has no unique index.

NOTE: If you select a field or fields that do not have unique values, this will not be detected until you try to update a record and are prevented from doing so. At that time, you may delete the link and re-link the SQL Server table, specifying a different field(s) for the unique index.

REFERENCES

For more information about creating indexes on SQL Server database tables, see the SQL Server "System Administrator's Guide," or pages 67-72 in the SQL Server "Language Reference."

For more information about updating linked tables, search the Help Index for "Attach Table," or "Attached Tables" and display the available information, or ask the Microsoft Access 97 Office Assistant.


Additional query words: odbc
Keywords : kbusage OdbcOthr
Version : 1.0 1.10 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : kbworkaround


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: May 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.