Tech Support Guy banner
Status
Not open for further replies.

importing database in access

1K views 3 replies 3 participants last post by  williamc 
#1 ·
I'm trying to import a database to an existing database. Both are identical, aside from their WO_NUM field, which distinguishes each record (and is primary key).

I have enough information in the database fields to make the database I want to import match. The problem is that the database is not allowing me to manually enter data. When I try a manual increment of the WO_NUM table, I am getting the following message:

ODBC-call failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of UNIQUE KEY constraint 'UC_TASKS_WOID_1'. Cannot insert duplicate key in object 'TASKS'.(#2627)[Microsoft][ODBC SQL Server Driver][SQL Server] The statement has been terminated. (#3621)

Any help is appreciated. Thank you.
 
#2 ·
I'm assuming you are importing the tables, it seems like you are importing the primary key also, that will cause a problem because there will be duplicates.

You can try dumping the table into Excel and strip off the ID column and then import the excel table or Paste it into the table. Access will create new ID's for it.
 
#3 ·
williamc said:
I'm trying to import a database to an existing database. Both are identical, aside from their WO_NUM field, which distinguishes each record (and is primary key).

I have enough information in the database fields to make the database I want to import match. The problem is that the database is not allowing me to manually enter data. When I try a manual increment of the WO_NUM table, I am getting the following message:

ODBC-call failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of UNIQUE KEY constraint 'UC_TASKS_WOID_1'. Cannot insert duplicate key in object 'TASKS'.(#2627)[Microsoft][ODBC SQL Server Driver][SQL Server] The statement has been terminated. (#3621)

Any help is appreciated. Thank you.
From the looks of the error message it looks like you have a field in the table set to not accept duplicates.
 
#4 ·
Thanks for the suggestions. Still no luck though.

I tried the methods mentioned, but I am unable to increment the table, even by doing it one record at a time. By going to the last row, I tried pressing enter and typing in the next available field number. I still get the error message when I move to the next cell. The table is linked to another called LASTWOID. I've determined that this is where the TASKS table determines the last key value and increments from it. It only contains a number value associated with the record in the TASKS table.

Any other ideas?

William
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top