* Avoid calling TDBConnection.ClearDbObjects() on active database after copying table. Instead, call actRefresh which takes care of a probably opened table object in the table editor.

* Check for table existence via SELECT on IS.TABLES, avoid usage and refresh of db objects here also.
* Fixes issue #3250.
This commit is contained in:
Ansgar Becker
2013-06-24 04:56:24 +00:00
parent 5ed52a851a
commit e5486ebc5e
2 changed files with 29 additions and 18 deletions

View File

@ -237,7 +237,8 @@ type
spDbObjectsTable, spDbObjectsCreateCol, spDbObjectsUpdateCol, spDbObjectsTypeCol,
spEmptyTable, spRenameTable, spCurrentUserHost,
spAddColumn, spChangeColumn,
spSessionVariables, spGlobalVariables);
spSessionVariables, spGlobalVariables,
spISTableSchemaCol);
TDBConnection = class(TComponent)
private
@ -1355,6 +1356,7 @@ begin
FSQLSpecifities[spChangeColumn] := 'CHANGE COLUMN %s %s';
FSQLSpecifities[spSessionVariables] := 'SHOW VARIABLES';
FSQLSpecifities[spGlobalVariables] := 'SHOW GLOBAL VARIABLES';
FSQLSpecifities[spISTableSchemaCol] := 'TABLE_SCHEMA';
end;
ngMSSQL: begin
FSQLSpecifities[spEmptyTable] := 'DELETE FROM ';
@ -1364,6 +1366,7 @@ begin
FSQLSpecifities[spChangeColumn] := 'ALTER COLUMN %s %s';
FSQLSpecifities[spSessionVariables] := 'SELECT '+QuoteIdent('comment')+', '+QuoteIdent('value')+' FROM '+QuoteIdent('master')+'.'+QuoteIdent('dbo')+'.'+QuoteIdent('syscurconfigs')+' ORDER BY '+QuoteIdent('comment');
FSQLSpecifities[spGlobalVariables] := FSQLSpecifities[spSessionVariables];
FSQLSpecifities[spISTableSchemaCol] := 'TABLE_CATALOG';
end;
end;