schema_table.py 418 B

1234567891011121314
  1. """call using an open ADO connection --> list of table names"""
  2. from . import adodbapi
  3. def names(connection_object):
  4. ado = connection_object.adoConn
  5. schema = ado.OpenSchema(20) # constant = adSchemaTables
  6. tables = []
  7. while not schema.EOF:
  8. name = adodbapi.getIndexedValue(schema.Fields,'TABLE_NAME').Value
  9. tables.append(name)
  10. schema.MoveNext()
  11. del schema
  12. return tables