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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DragDrop ImportRow and Duplicate Key

Status
Not open for further replies.

Dimm

Programmer
Jun 26, 2001
16
GB
I have two datagrids, both draw some of thier data from the same SQL table, and the rest from several others.

I need to drag data from one grid to the other, in doing so, all I need to do is change a few fields in the row. the primary key in the shared table is unchanged.

In the dragdrop when I import the datarow I get a Cannot insert duplicate key in the shared table.

I think I understand why this is happening, as the data remains in the shared table and I am trying to add the same row albeit altered. Is there an easy way around it. I dont want to delete the row first as we have several triggers that run when the row pk is changed/deleted/inserted

Hopefully there is a simple solution, but I just cant see it.

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top