getDBInfo method

void getDBInfo(
  1. TSchemaType aSchemaType,
  2. String aSchemaObjectName,
  3. String aReturnField,
  4. TStrings aList,
)

Implementation

void getDBInfo(TSchemaType aSchemaType, String aSchemaObjectName,
    String aReturnField, TStrings aList) {
  if (_sqlTransaction == null) {
    databaseError(SErrConnTransactionnSet);
  }
  final qry = TCustomSQLQuery(null);
  try {
    qry.transaction = _sqlTransaction;
    qry.database = this;
    qry.parseSQL = false;
    qry.setSchemaInfo(aSchemaType, aSchemaObjectName, "");
    qry.open();
    aList.clear();
    while (!qry.eof) {
      aList.add(qry.fieldByName(aReturnField).asString.trim());
      qry.next();
    }
  } finally {
    qry.free();
  }
}