Exception:
Server was unable to process request. ---> Violation of PRIMARY KEY constraint 'PKCM20100'. Cannot insert duplicate key in object 'CM20100'.
The statement has been terminated.
GetType: System.Web.Services.Protocols.SoapException
Source: OED2
StackTrace: at OED2.OEDeConnect.createSOPPayment(Int16 SOPTYPE, String SOPNUMBE, Int32 SEQNUMBR, Double PaymentAmount, Int16 PaymentType, String CheckNumber, String CCName, String CCAuthCode, String CCExpnDate, DateTime dtPaymentDate, Int16 PaymentActionType)
at OED2.SOPCreatePayment.RadGridView1_UserDeletingRow(Object sender, GridViewRowCancelEventArgs e)
TargetSite: System.String createSOPPayment(Int16, System.String, Int32, Double, Int16, System.String, System.String, System.String, System.String, System.DateTime, Int16)
This sounds like a straight forward error, I didn't think I'd have too much problem solving it... but I was missing a piece.
This is happening when deleting SOP payments, and only when I delete more than one payment on an order.
When I look in the table, there is a record there with '0' for the CMRECNUM, and it seems like the second delete is trying to do the same thing - hence the dup key issue