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

android - error -305 on UPDATE

Former Member
7,073

My android app is using an udb file. My problem is on an UPDATE statement, when i execute it the first time everything works properly but when I do it the second time (I execute the prepared SQL statement and the query string is still clean), I get this error:

09-27 15:07:35.920: WARN/System.err(19311): com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-305]: I/O error 200017 -- transaction rolled back

Any helping idea in what might be the reason? thank you in advance

View Entire Topic
Former Member

For the query sequence which is throwing an exception, do they use the same connection, or does each iteration create its own connection to the database? If the latter, does the connection string specifify a database name or a file name? In other words, is it possible that the second update could be fouling when it tries to write to a still-locked file or file segment?

(Caveat: I haven't worked with Ultralite on Android yet, but I'm presuming that a file-based connection may not automatically detect whether it or not it can really write to the file -- I just have vague recollections of Linux growing fur and fangs when it came to mixing file locks and multi-threaded processes.)

Former Member

My problem was an error in the classes I use. While I projected the app in such a way as I open the connection only at the beginning and use a singleton class for this; I figured out that some classes open the connection again! Fixing it I dont get the same problem. Thanks a lot for your help/time

PS: My question about documentation-for-android-dev-using-afaria is still valid.

VolkerBarth
Contributor
0 Likes

Glad you got it:) - Is there any answer that seems acceptable?

For the Afaria question, I'd recommend a new question on its own (and no, I don't know the answer...)

Former Member
0 Likes

yes, the W.Clardy comment was helpful.

For the Afaria question, I am going to post a new question soon.

Thanks