Hello, I am migrating an existing Windows Mobile (compact framework) app to a WinRT...UWP app. The original app uses an ultralite database and ado.net type methodologies to manage the database (of course, the ultralite specific implementation). I'm using the developer edition of SQL Anywhere 17. I am confused about the interface to update result sets. I assumed by the methods provided that it is similar to the old stuff, in that you can update the result set during execution of the app and then apply (resultset.update()) those changes to the database. Is this correct? If so, when I call Resultset.SetString, I get an error that the state of the result set is wrong. The state is 'on row'. It's on the first row...I called Resultset.First(). There's only 1 row in the result set. If not, how does it work? Thank you, Paula |
Did you add an UpdateBegin() before you attempted the update?
Thank you for the response, Chris.
I did try calling UpdateBegin() before updating the column (after posting this question) and I get a different exception:
'The text associated with this error code could not be found.
UltraLite Error[-813]'
From what I found (it's difficult finding the meaning to the errors, by the way!) a -813 means the result set is not updatable. It's a simple select * from table query that returns 1 row.
What other reasons would the result set not be updatable?
Hi Paula! Did you resolve this issue?
A select statement requires a FOR UPDATE clause if you want allow updates. By default it is FOR READ ONLY. (The reason for the default is some queries are more expensive to execute when they allow updates.)
For error descriptions, I usually look here: http://dcx.sap.com/index.html#sqla170/en/html/81133cb16ce210148ebed01b8c288d75.html
Thanks for the info, Tim. I resolved it by just not doing it that way... I tried to write my own but it was too buggy. I ended up just writing the updates in SQL.