Saxonite - various
This commit is contained in:
@@ -363,10 +363,10 @@ namespace Sarand.Net.Standard.Dbas.Data
|
||||
//-------------------------------------------------------------------
|
||||
// NB Always use ODBC connection for querying schema.
|
||||
// eg. SQL Connection GetSchema('Indices') doesn't return index columns.
|
||||
public override List<String> GetTableNames ()
|
||||
public override List<String> GetTableNames (bool refresh = false)
|
||||
{
|
||||
// Only populate table names if not previously done.
|
||||
if (tables.Count < 1)
|
||||
if (tables.Count < 1 || refresh)
|
||||
{
|
||||
using (DbConnection dbConnection = CreateConnection(true))
|
||||
{
|
||||
@@ -388,7 +388,7 @@ namespace Sarand.Net.Standard.Dbas.Data
|
||||
dbConnection.Open();
|
||||
if (tables.Count < 1)
|
||||
PopulateTableNames(dbConnection);
|
||||
foreach (DbDfnTable table in tables)
|
||||
foreach (DbDfnTable table in tables.ToList())
|
||||
{
|
||||
if (!table.HasColumns())
|
||||
{
|
||||
@@ -398,7 +398,7 @@ namespace Sarand.Net.Standard.Dbas.Data
|
||||
}
|
||||
}
|
||||
}
|
||||
return new List<DbDfnTable>(tables);
|
||||
return tables.ToList();
|
||||
}
|
||||
public void ClearTableDfns ()
|
||||
{
|
||||
@@ -488,7 +488,7 @@ namespace Sarand.Net.Standard.Dbas.Data
|
||||
}
|
||||
}
|
||||
}
|
||||
List<DbDfnTable> tablesUnsorted = new List<DbDfnTable>(tables);
|
||||
List<DbDfnTable> tablesUnsorted = tables.ToList();
|
||||
tables.Clear();
|
||||
tables.AddRange(tablesUnsorted.OrderBy(item => item.Name).ToList());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user