Hi,
To begin with I want to excuse my English. It's not my native tongue. I find this difficult to explain but I'll try.
Background: I'm designing a tool which sends incremental updates to a server. I want to store all information for each upload in a SQLite database.
Problem: I don't know how to handle database queries with minimal fuss. I would love to just make the query, block until it's complete and then return the results to the client. Instead, I create a asyncronous task which runs the query and then calls a delegate when it's done. Or I poll the task (without blocking) to see if it's done.
But this forces me to create a lot of extra code just for handling the results, invalidate the delegate and stop the task if the client disconnects, etc. Is this the right way to go? I supose you can't tell from the limited information I've given, but does it sound totally wrong?
Thanks!