on ‎2017 Jan 16 6:20 PM
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
Request clarification before answering.
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".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.