Troubleshoot importing and linking

In a Microsoft Access database, for most records that cause an error, Microsoft Access adds a row to a table called Import Errors. To view the list of errors that were encountered, open the Import Errors table from the Database window.

I get errors when I import a spreadsheet or text file.

Here are the most typical reasons for encountering errors:

Importing a text file is taking a long time.

If importing a text file takes an unexpectedly long time, it might be because many errors are occurring. To cancel importing, press CTRL+BREAK. To view the list of errors that were encountered, open the Import Errors table from the Database window.

I get errors when I append a spreadsheet or text file.

Appended records must be compatible with the existing table's structure: Each field must have the same data type as the corresponding field in the destination table, and the fields must be in the same order (unless you're using the first row of the file as field names, in which case the field names must match).

If you suspect that the problem is with the data that you're appending, edit your spreadsheet or text file, and then import again. Alternatively, you might need to change the destination table itself. You can reorder the fields, change data types, run an update query (to reformat or recalculate the data, for example), or run a make-table query (to split one field into two fields or combine several fields into one field, for example).

Here are the most typical reasons for encountering errors:

I can't open or update a linked Microsoft Visual FoxPro or dBASE table.

I can't open or update a linked Paradox table.

I can't open or update a linked SQL table.

I get a key violation message.

A key violation occurs if:

If you run such a query, it will not modify the records that cause the key violation.

To modify records in a way that will violate referential integrity, you can break the relationship between the affected tables or turn referential integrity off, and then modify the affected tables one at a time. However, the resulting data in the two tables may then conflict.

 

I imported a file and now I have an Import Errors table.

The Import Errors table contains descriptions of most error messages Microsoft Access encounters when trying to import your text file or spreadsheet in a Microsoft Access database. The table includes field names and row numbers that indicate which data has caused errors.

If Microsoft Access reports errors, open the Import Errors table and try to determine why Microsoft Access can't import all of the records. The following table lists possible import errors and describes their causes.

Error Description
Field Truncation A value in the file is too large for the FieldSize property setting for this field.
Type Conversion Failure A value in the text file or spreadsheet is the wrong data type for this field.
Key Violation This record's primary key value is a duplicate ù it already exists in the table.
Validation Rule Failure A value breaks the rule set by using the ValidationRule property for this field or for the table.
Null in Required Field A Null value isn't allowed in this field because the Required property for the field is set to Yes.
Null value in AutoNumber field The data that you're importing contains a Null value that you attempted to append to an AutoNumber field.
Unparsable Record A text value contains the text delimiter character (usually double quotation marks). Whenever a value contains the delimiter character, the character must be repeated twice in the text file; for example:

10 - 3 1/2"" disks/box

 

If you suspect that the problem is with your data, edit your text file or spreadsheet. If you're appending records to an existing table, you might need to change the table itself (reorder the fields or change property settings, for example). When you have solved the problem, import the data again.

I'm trying to import or link data from my secured database.

If the database that you want to import or link has a database password, then you must provide the password before you can continue. Linking tables from such a database may have unforeseen consequences.

File extensions don't show up beside the file names in the Files Of Type dialog box.

You have not selected the Show hidden files and folders option in Windows Explorer. See Windows Help for information on selecting the option.

I get an "ODBC û connection to datasourcename failed" message when I open a table or form in a converted database.

The message "ODBC û connection to datasourcename failed" occurs when a table in your converted Microsoft Access version 1.x or 2.0 database is linked to an ODBC data source that uses a 16-bit driver manager and driver. Microsoft Access 2002 can open only linked ODBC data sources that use the 32-bit versions of the ODBC Driver Manager (Odbc32.dll) and the appropriate ODBC driver ù for example, the 32-bit version of Microsoft SQL Server ODBC Driver (Sqlsrv32.dll).

To correct this problem, you must create a new, identically-named 32-bit data source name (DSN) for each ODBC data source that is linked to the original Access 1.x or 2.0 database.

  1. In Microsoft Windows Control Panel, double-click Administrative Tools, and then double-click Data Sources (ODBC).
  2. Create the new DSN by entering values identical to the original DSN. For example, for Microsoft SQL Server, you need to define at least Data Source Name and Server, but you may also need to define additional values such as the Database Name.

If you are uncertain what the original name of the DSN was, open the original database in the version of Microsoft Access that it was created with, open the linked table in Design view, and then display the Table Properties sheet. The table's Description property contains the definition for the ODBC connection string. The parameter following DSN= in the connection string is the name of the DSN.