I've just noticed that v17 Central doesn't return the number of rows updated after an UPDATE... It gives you a warm fuzzy feeling that you did the right thing when you see 'one row(s) updated' and it's what you intended to do... Is there a hidden checkbox somewhere that restores this feature?
On the same subject if I wanted to add that to one of our utilities (outside of Sybase Central) what method can be used to return the number of rows updated?
and return a integer of 3 if three rows were effected?
asked 16 Jan, 18:20
I don't know about the Sybase Central part but there are several ways to get the number of rows affected by a statement depending on your client. For ESQL, there is a field set in your SQLCA: http://dcx.sap.com/index.html#sqla170/en/html/3be2f5e26c5f101499c1907455d3c6be.html
In ODBC, there is a SQLRowCount function: https://msdn.microsoft.com/en-us/library/ms711835(v=vs.85).aspx
You can also just execute "select @@rowcount".
answered 16 Jan, 18:53