Last post Aug 30, 2016 05:08 AM by Cathy Zou
Aug 26, 2016 11:13 AM|moruff|LINK
Please can anyone help to resolve this
i ve this tables
Column of Table A PK stands for Primary Key
And For Table B FK is foreign Key
Table B is generated as viewstate and bind to a gridview which is to be process as bulk to save to table B
But where am stuck is this
I need to process both at the same time using a store procedure and when their is failure in table B then it should roll back table A and not commit.
I was able to archieve this seperatly but i need a single process to process this action using a stored procedure.
Aug 30, 2016 05:08 AM|Cathy Zou|LINK
From your description, would you want to insert data to TableA from TableB and you want have a roll back when insert failure within a stored produce. If that the case, I suggest you could use TRANSACTION in stored produce to get a roll back when insert failure.
The following link explains how to use TRANSACTION in stored produce, you could refer to it.
Hope this can help you. If you have any question and confusion about the problem. You could provide us with your two tables with some data and what final outcome you want. So that we can solve your problem timely and precisely.