OpenQuery Fun and Frolocking

Ive been playing with OPENQUERY to sync some data with a remote database. I found a fantastic blog entry with all of the basic commands (Select, Insert, Update. Delete) and how they execute within the OpenQuery syntax.

Check out Less Than Dot Blog for some great examples of syntax.

While working on the update portion of my code, I was dismayed to get the following error;

OLE DB provider "MSDASQL" for linked server "SITWEBDEV" returned message "Key column information is insufficient or incorrect. Too many rows were affected by update.".
Msg 7343, Level 16, State 4, Line 1
The OLE DB provider "MSDASQL" for linked server "SITWEBDEV" could not UPDATE table "[MSDASQL]". 

However, after being pointed in the right direction by WebIT Diary, the problem was that I didnt include a primary key field in my select statement.

Problem solved.