MySQL Forums
Forum List  »  Newbie

Store procedure transaction resets effected rows to 0
Posted by: Nir Shezifi
Date: November 01, 2023 02:55AM

Hello,
I'm moving a large codebase from MSSQL to MySQL and i'm struggling to figure out how to solve a big issue with MySQL without changing my code base.

I have a store procedure that do multiple changes to multiple tables, so i'm using a TRANSACTION so i'm sure nothing gets semi-updated or deleted.

In MSSQL, when you call COMMIT, you get the effected rows back when you are calling using ExecuteNonQuery.
In MySQL, the returned value is 0. it's like COMMIT in MySQL has a value.


I want to be able to call my store procedure using non-query and get the correct affected rows, i have many store procedures with a TRANSACTION and i don't want to change each one's logic.

Any ideas what i can do to get COMMIT to not change effected rows?

Options: ReplyQuote


Subject
Written By
Posted
Store procedure transaction resets effected rows to 0
November 01, 2023 02:55AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.