Sort column names in data grid by their ordinal position. Closes #854

This commit is contained in:
Ansgar Becker
2020-01-15 19:55:11 +01:00
parent 08fa8a0c3b
commit 92a0c0ee79

View File

@ -4541,7 +4541,8 @@ begin
else
SchemaClause := GetSQLSpecifity(spISTableSchemaCol)+'='+EscapeString(Table.Database);
ColQuery := GetResults('SELECT * FROM '+QuoteIdent('information_schema')+'.'+QuoteIdent(InformationSchemaObjects[TableIdx])+
' WHERE '+SchemaClause+' AND TABLE_NAME='+EscapeString(Table.Name));
' WHERE '+SchemaClause+' AND TABLE_NAME='+EscapeString(Table.Name)+
' ORDER BY ORDINAL_POSITION');
while not ColQuery.Eof do begin
Col := TTableColumn.Create(Self);
Result.Add(Col);