Each database uses the same view but with different columns.
If we change the database from the connection during runtime the TMSQuery keeps all the field information of the old database.
This is a problem because every view in each database has additional or different field informations.
Code: Select all
connection.Database := 'Database1';
query.Connection := connection;
query.SQL.Text := 'SELECT * FROM View';
query.Open;
query.Close;
connection.Database := 'Database2';
query.Open; // <- Query has already fields of Database1 ViewThanks in advance