Click here to Skip to main content
15,064,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am able to delete a row from gridview using stored procedure from wizard...but the deleted row should be inserted to into an history table...Please help....
Jawad Ahmed Tanoli 31-Mar-14 11:50am
get selected row data from Grid then send it to your delete store procedure First Insert it into your history table then delete it.

1 solution

The logic is:
1) insert data into HistoryTable before deleting data from SourceTable
2) delete data from SourceTable

INSERT INTO HistoryTable (<field_list>)
SELECT <field_list>
FROM SourceTable
WHERE PKey = @PKey

FROM SourceTable
WHERE PKey = @PKey

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900