title: Type mismatch between columns in GET query. How to define returning column type when only NULL is returned?
body: <p>I have an existing empty DataTable with 4 columns A, B, C, D:</p>
  <pre><code>DataTable dataTable = new DataTable
  {
      Columns = 
      {
          new DataColumn(&quot;A&quot;, typeof(string)){ AllowDBNull = true },
          new DataColumn(&quot;B&quot;, typeof(string)){ AllowDBNull = true },
          new DataColumn(&quot;C&quot;, typeof(string)){ AllowDBNull = true },
          new DataColumn(&quot;D&quot;, typeof(string)){ AllowDBNull = true }
      }
  } 
  </code></pre>
  <p>And I would like to fill that table with data from the database. The database contains only the columns C and D, So I would like to fill the first 2 columns with NULLs.</p>
  <p>So I call:</p>
  <pre><code>await using DbConnection connection = new SqliteConnection(&quot;Data Source=MyDatabase.db&quot;);
  await using DbCommand command = connection.CreateCommand();
  string selectCommand = $&quot;SELECT NULL as 'A', NULL as 'B', C, D FROM Table &quot;;
  command.CommandText = selectCommand;
  
  await connection.OpenAsync().ConfigureAwait(false);
  await using DbDataReader reader = await command.ExecuteReaderAsync().ConfigureAwait(false);
  dataTable.Load(reader);
  await connection.CloseAsync().ConfigureAwait(false);
  </code></pre>
  <p>Once I get to that line:</p>
  <pre><code>dataTable.Load(reader);
  </code></pre>
  <p>the app crashes with an exception:</p>
  <pre><code>System.InvalidOperationException: 'Inconvertible type mismatch between SourceColumn 'A' of Byte[] and the DataColumn 'A' of String.'
  </code></pre>
  <p>Is it possible to modify the code, so that the returning column 'A' will not be byte[] but a string. I tried using:</p>
  <pre><code>string selectCommand = $&quot;SELECT CAST(NULL as TEXT) as 'A', CAST(NULL as TEXT) as 'B', C, D FROM Table &quot;;
  </code></pre>
  <p>But it does not work. It throws the same exception.
  It works when I use empty strings rather than NULLS, but I would like them to be NULL without any additional iterative work.</p>