11-30-2012, 03:37 PM
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.
|
[C#] Mysql count Updates
|
|
11-30-2012, 03:37 PM
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.
11-30-2012, 04:38 PM
Its the return value of ExecuteNonQuery
11-30-2012, 05:48 PM
This only return the amoun of the Querys i runned. and i need how many updates are done in the database
11-30-2012, 10:02 PM
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
11-30-2012, 10:47 PM
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. |
|
« Next Oldest | Next Newest »
|