Format: text/x-python
⬇ Download File (438 B)
   1  """call using an open ADO connection --> list of table names"""
   2  
   3  from . import adodbapi
   4  
   5  
   6  def names(connection_object):
   7      ado = connection_object.adoConn
   8      schema = ado.OpenSchema(20)  # constant = adSchemaTables
   9  
  10      tables = []
  11      while not schema.EOF:
  12          name = adodbapi.getIndexedValue(schema.Fields, "TABLE_NAME").Value
  13          tables.append(name)
  14          schema.MoveNext()
  15      del schema
  16      return tables
  17