Using the code provided, I am unable to reproduce this issue with an internal build of 2.0. What version of the runtime are you using? Can you post your database file for testing?
I believe I am using AIR 1.5.3 with flex_sdk_220.127.116.1175.
Database file is available from: http://www.billybob.eu/roleready.db3
I'll set up another SDK for use with AIR 2b2 and test
Running with AIR 2 beta2 and getting similar error: Error #2044: Unhandled error:. text=Error #3115: SQL Error.
Error #2044: Unhandled SQLErrorEvent:. errorID=3115, operation=schema , message=Error #3115: SQL Error. , details=No schema objects in database 'main' were found.
Executing code was unchanged.
1 person found this helpful
With that db file I can reproduce the issue. This is definitely a bug. It is dispatching an error even though the schema is actually there, you can get at the schema even after the error is dispatched by using the getSchemaResult() method of the connection. The table structure is hitting an edge case in the core code. A guess at a workaround based on what I am seeing is that if you just add another table or two to the db you won't get the error anymore.
Hope that helps.
Thanks for the info, jw
Could you elaborate a little on 'The table structure is hitting an edge case in the core code.'
I understand this may be a bug in AIR SQLite, but i'm curious to know why my table structure might cause this apparently rare problem.
I'm not too familiar with the bug reporting process, could you perhaps provide advice on bringing this issue to the attention of Adobe.
I am yet to try your suggestions, will report back soon.
Sure I can elaborate a little bit. There is a an algorithm that we use to break data up into chunks when a connection is in async mode. The size of the schema in your database is just the right size to tickle a bug that causes an error to be dispatched even though everything succeeded. I have already logged a bug for this issue and have a local fix. No guarantees which release the fix will land in though.
Did you try the workaround?
Thanks for the additional info.
I've added additional tables to the database as you suggested. The SQLEvent.SCHEMA event is now being dispatched properly with no unexpected errors reported.
Your help has been greatly appreciated. Best of luck with future releases!