Microsoft KB Archive/253757

From BetaArchive Wiki

Article ID: 253757

Article Last Modified on 1/26/2005


  • Microsoft Access 2000 Standard Edition

This article was previously published under Q253757

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

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).


When you upsize an Access table that contains Replication ID fields, you may receive the following error message:

Microsoft Access was unable to append all the data to the table.

The contents of fields in x record(s) were deleted, and 0 record(s) were lost due to key violations.

  • If data was deleted, the data you pasted or imported doesn't match the field data types or the FieldSize property in the destination table.

  • If records were lost, either the records you pasted contain primary key values that already exist in the destination table, or they violate referential integrity rules for a relationship defined between tables.

Do you wish to proceed anyway?

If you proceed, you see one of the following results when the upsizing process is finished:

  • If you do not have a unique index on the field that contains Null values, the table is upsized as well as the data.
  • If the field has a unique index but ignores Null values, the number of records deleted will be the count of the null records, but none of the data is upsized.


You have one or more Replication ID fields in the table, and one of the Replication ID fields has Null values. If there are no Null values in the table's Replication ID fields, the table is upsized without the error, and all the data is upsized.


To work around this problem, temporarily drop the index from the Replication ID field that contains the Null values before you upsize the table. After the table is upsized, you can add the index back to the SQL Server table with Enterprise Manager or in an Access Project. To see an example of how to do this, follow these steps:

  1. Open the original Access database (.mdb).
  2. Open the problem table in Design view.
  3. On the View menu, click Indexes.
  4. Delete the index that is on the Replication ID field that contains the Null values.
  5. Upsize the database. The table should be upsized with all the data.
  6. Open the target SQL Server database, either in SQL Server Enterprise Manager or in an Access project.
  7. Open the table in Design view.
  8. Right-click anywhere in the table design area, and then click Properties.
  9. In the Properties dialog box, click Indexes/Keys.
  10. Click New. On the first blank row under Column Name, select the column on which you want an index. In the Index Name box, accept the default index name or type a different name.
  11. Change any of the other default settings for the index if you need to.
  12. Close the Properties dialog box.
  13. Save and close the table.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.  This problem was corrected in Access 2002.


Steps to Reproduce the Behavior

  1. Create a new Access database, and name it UpsizeTest.mdb.
  2. In the new database, create a table with the following specifications, and then save it as tblTest:

       Table Fields: tblTest
       Field Name: Col1
       Data Type: Number
       Field Size: Replication ID
       Indexed: Yes (No Duplicates)
       Field Name: Col2
       Data Type: Number
       Field Size: Replication ID
       Indexed: Yes (No Duplicates)
       Field Name: Col3
       Date Type: Text
       Field Size: 20
       Indexed: Yes (Duplicates OK)
       Table Properties: tblTest
       PrimaryKey: Col1
       Index1: Col2
  3. Save the table, and then view it in Datasheet view.
  4. In the Col1 field, type the following Replication IDs (be sure to include the braces {}):

  5. In the Col2 field, type the following Replication IDs. Leave the field blank for the last three records:

  6. In the Col3 field, type the following names:

  7. Save and close the table.
  8. On the Tools menu, point to Database Utilities, and then click Upsizing Wizard.
  9. Select to use an existing SQL Server database, and then click Next.
  10. Select the appropriate DSN to connect to your SQL Server, and then click OK.
  11. On the page that asks you which tables to upsize, double-click tblTest so that it appears on the right.
  12. Click Next twice.
  13. On the page that asks you which application changes you want to make, click Link SQL Server tables to existing application.
  14. Click Finish. Note that you receive the error message mentioned in the "Symptoms" section of this article.
  15. Click Yes to proceed with upsizing.
  16. Close the resulting Upsizing Report. In the list of tables, you see that the original table is now called tblTest_local, and a new attached table to the upsized table has the original name with a globe icon, as expected.
  17. Open the attached table, tblTest, and note that no data has been upsized.

NOTE: In this example, the data would be upsized if either there were no index on Col2 or if Col2 contained no Null values. However, because the Replication ID fields are upsized as a UniqueIdentifier data type, the upsized data will appear as #Deleted in the linked table unless you have applied the Microsoft Jet 4.0 SP 4 or later update to your system.

For additional information about this problem, click the article number below to view the article in the Microsoft Knowledge Base:

257487 ACC2000: Access Displays #DELETED When You Insert Data with the Same Value into a Non-Unique Key Column of a Remote Table

Additional query words: pra ReplicationID

Keywords: kbbug kbnofix KB253757