Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error 3362

Status
Not open for further replies.

gnosis13

Programmer
Jul 13, 2001
263
US
I have an Access database broken down into multiple frontends and currently one backend .mbd. I have exported the tables to a SQL server and linked them back on one of my frontends (moving backend to SQL). Everything works good except the code used to clear all records from a table:

SQL = "Delete * From tbl_press_rolls"
DoCmd.RunSQL SQL

Produces "Run-time error 3362 - Single-row update/delete affected more than one row of a linked table. Unique index contains duplicate values".

Using MSDE Query, I can easily delete the records with no errors. However, Access just doesn't want me to do this.

I have tried different variations including just one record at a time and "Delete tbl_press_rolls"....all get the same result from Access (2003) but will work from MSDE Query. The database was originally built using Access 97 and is now in Access 2000 format but I don't think that has anything to do with it.

As far as linked tables, none of my tables are linked by intention. SQL Server may be doing something in the background but there are no relationships or "links" that I know of.

I am sure I am overlooking somthing very simple...it is eluding me. Any insight?

A+, N+, MCP
 
For each linked table check that access has defined a primary key or at least an unique index.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Oh man, you are on to it! I removed the ID field from the tables last week working on a different issue....need more coffee!

Thanks.

A+, N+, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top