Query/Macro Issue

denileigh

Registered User.
Local time
Today, 10:21
Joined
Dec 9, 2003
Messages
212
Hello, I am trying to redo some major sections of our database however, I am completely self taught and we just switched to a sql backend so it's not necessarily easy for me.

I made a copy of the old database and went to town on the new one. I have a macro that runs a query that deletes all of the records in a table but I am getting and error in the new database although I've changed nothing and the old one works fine.

In the new database I tried running just the query without the macro and I am getting this error: "Single-row update/delete affected more than one row of a linked table. Unique index contains duplicate values. "

I've made no changes. Can someone point me in the right direction to begin to try to figure out the issue?

Thanks so much for your help!
 
when you link to a sqlserver table you need to specify a column with a unique id - if you don't you get this sort of problem.

Are you linking to the table in sqlserver or a view?
 
The server but the old one worked fine and I didn't change anything. UGGGGGSSS Maybe the table on the server doesn't have a unique ID eh? Should I start there?
 
The server but the old one worked fine and I didn't change anything. UGGGGGSSS Maybe the table on the server doesn't have a unique ID eh? Should I start there?

I have experienced the same error before, and as CJ_London said, the problem is likely due to a problem with the SQL Server Table Definitions. Take a look at the AutoNumber Field for the Table, and make sure that it is defined properly (See below).

-- Rookie

Primary Key = True
Allow Nulls = False
Identity = True
 
I have experienced the same error before, and as CJ_London said, the problem is likely due to a problem with the SQL Server Table Definitions. Take a look at the AutoNumber Field for the Table, and make sure that it is defined properly (See below).

-- Rookie

Primary Key = True
Allow Nulls = False
Identity = True


Okay - I checked all that but am still having the same issue. Is there anything else I can check? Thanks so much!
 

Users who are viewing this thread

Back
Top Bottom