I know that is is not the recommanded way of executing a query.
First of all I wanted to use it for testing purposes. It is sometimes easier to write SQL statement than using the LLBL to have it generated and some queries I wanted to test can be generatet the way I need it. (for example subquery in a from clause).
I followed the instruction in the thread but I was not able to execute my sql statement.
I thought that it should be possible to get all the necessary classes to (the DbConnection and the DbDataAdapter from the class DataAccessAdapter), but this is not the case.
My code
IDbConnection theConnection = theExtendedDataAccessAdapter.CreateConnection(theExtendedDataAccessAdapter.ConnectionString);
DbDataAdapter theDbDataAdapter = theExtendedDataAccessAdapter.CreateDataAdapter();
IDbCommand theCommand = theConnection.CreateCommand();
theCommand.CommandText = "Select * from MyTable";
theDbDataAdapter.SelectCommand = theCommand; // Compile-time error
DataTable table = new DataTable();
theDbDataAdapter.Fill(table);
Now the DbDataAdapter expects a Object of the type DbCommand by I only have a IDbCommand.