Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Location
    Nottingham - UK
    Posts
    113

    Red face Unanswered: Data Import Problem

    I have a master database consisting of 3 tables with 1 2 many relationships.

    I have than given empty empty copies of the database out and have had these returned with data that needs to be imported into the master.

    The problem is that the firdt import is ok, then the next one gives an error of duplicate data, but the data is unquie.

    Can anyone advise ?

    Thanks in advance

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    The problem is not the data, it's rather the primary key of the tables. I assume those are autoincrement. If you give out the db to different people they will create the same primary keys as the value is just increased by 1 each time a new record is created. You didn't get an error on the first import as Access "remembers" the last autoincrement value even if you delete all rows from the table. You will need to make yourself familiar with replication which will ensure unique primary keys throughout the replicas (the databeses you hand out). It also copes with more complicated scenarios as you have.

  3. #3
    Join Date
    Apr 2002
    Location
    Lincoln, England
    Posts
    4
    Rather than use autoincremet for your unique number create a little bit of basic code that creates a unique incrementing number using dcount which creates a number each time one greater than the total records in the table. Clearly make the field indexed with no duplicates an unable to accept null value this will stop any import from being wrongly numbered.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •