function TForm1.TableExists(TableName: String): Boolean;
var TableList:TstringList;
begin
  TableList:=Tstringlist.Create;
  ADOConnection1.GetTableNames(TableList);
  if TableList.IndexOf(TableName) >= 0 then  //如果表不存在
    Result := True
  else Result := False;
end;