AIR and sqLite : if table exists conditional
问题 How do I get a Boolean value in AS3 whether a table or an entry exists in the database? 回答1: As opposed to finding it manually with SQL you should use the built in Schema information classes/functions. Here is an example of how it would work. public function doesTableExist(connection:SQLConnection, tableName:String):Boolean { connection.loadSchema(); var schema:SQLSchemaResult = connection.getSchemaResult(); for each (var table:SQLTableSchema in schema.tables) { if (table.name.toLowerCase() =