[C#] Mysql count Updates
#1

Hey i wanna now how i can count the updates which was made by the programm?

So if i run a UPDATE query that i know how many updates was done.

#2

Its the return value of ExecuteNonQuery

 

#3

This only return the amoun of the Querys i runned.

and i need how many updates are done in the database

#4

No, it returns how many rows were affected by the query

 

 

2

 

25.2.3.1.5. ExecuteNonQuery

 

Executes a SQL statement against the connection and returns the number of rows affected.

 

Returns: Number of rows affected

#5

Ah yes if i update 2 things and i do Console.WriteLine(cmd.ExecuteNonQuery());

it write me 1, but 2 times.

so its right.

Thank you wiza.



Forum Jump:


Users browsing this thread: 1 Guest(s)