Code is in C# .NET standard
var connectionString = $"<connection string here>";
var connection = new DB2Connection(connectionString);
connection.Open();
IDbCommand command = connection.CreateCommand();
string sqlStatement = "<a valid query goes here>";
command.CommandText = sqlStatement;
IDataReader dataReader = command.ExecuteReader();
var data = new DataTable();
data = dataReader.GetSchemaTable(); //This throws a NotSupportedException.
//data.Load(dataReader); //This should work, but the above line is what throws the exception, which is what this method is calling internally.
A NotSupportedException is thrown on the last line that is not commented out, with the message 'Specified method is not supported.'
I have version 1.2.2.100 of IBM.Data.DB2.Core installed, and the version 11.1 license as well. If you need any more context let me know.
Thanks in advance.
You query select dont have join, only one table.
I propose you my code which use IDB2 objects :