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

asked 31 Jan '18, 08:59

Paula's gravatar image

Paula
126141521
accept rate: 0%

Did you add an UpdateBegin() before you attempted the update?

(31 Jan '18, 11:32) Chris Keating

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?

(31 Jan '18, 11:50) Paula
Replies hidden
1

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

(12 Apr '19, 17:09) Tim McClements
1
(12 Apr '19, 17:11) Tim McClements

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.

(13 Apr '19, 07:03) Paula
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×161

question asked: 31 Jan '18, 08:59

question was seen: 987 times

last updated: 13 Apr '19, 07:03