Hi Guys,
i am having a right game trying to delete some records from a simple table on my SQL server.
Say for instance the table dbo_Resource contains these records, where tasknumber 4 has 3 persons against it e.g.
tasknumber |person
4 | paul
4 | andy
4 | steve
and tasknumber is the primary key (because Ms Access makes you set a primary key with a linked table from SQL server)
When i run the code below and combo0 = 4
' Delete selected record
SQ = "DELETE * FROM dbo_Resource WHERE tasknumber = " & Me.Combo0 & ";"
'Execute the SQL statement
DoCmd.RunSQL (SQ)
I get a run time error message consisting of:
3362 Single-row update/delete affected more than one row of an attached (linked) table. Unique index contains duplicate values.
Any ideas?
PS// if i use an internal table in access it works with no error message! but the table must go on the SQL server because multiple users will use the app.
Thanks for any advice.
i am having a right game trying to delete some records from a simple table on my SQL server.
Say for instance the table dbo_Resource contains these records, where tasknumber 4 has 3 persons against it e.g.
tasknumber |person
4 | paul
4 | andy
4 | steve
and tasknumber is the primary key (because Ms Access makes you set a primary key with a linked table from SQL server)
When i run the code below and combo0 = 4
' Delete selected record
SQ = "DELETE * FROM dbo_Resource WHERE tasknumber = " & Me.Combo0 & ";"
'Execute the SQL statement
DoCmd.RunSQL (SQ)
I get a run time error message consisting of:
3362 Single-row update/delete affected more than one row of an attached (linked) table. Unique index contains duplicate values.
Any ideas?
PS// if i use an internal table in access it works with no error message! but the table must go on the SQL server because multiple users will use the app.
Thanks for any advice.