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() == tableName.toLowerCase())
{
return true;
}
}
return false;
}
source
No comments:
Post a Comment