cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Rows updated

0 Likes
5,292

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?

Say

  UPDATE Customers SET Customer_Name = 'Smith' WHERE Customer_Name = 'Jones'

and return a integer of 3 if three rows were effected?

Thanks

View Entire Topic
johnsmirnios
Product and Topic Expert
Product and Topic Expert

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".