title: getting the SQL Server Schema for a table
body: <p>I have the following C# code that I am trying to get to return the stored procedure results along with the schema of those results. Below is how my code (simplified) currently looks...</p>
  
  <pre><code>Database db = DatabaseFactory.CreateDatabase();
  DbCommand dbCommand = db.GetStoredProcCommand("MyStoredProcedure");
  IDataReader drData = db.ExecuteReader(dbCommand);
  
  DataTable tblSchema;
  tblSchema  = drData.GetSchemaTable();
  </code></pre>
  
  <p>The GetSchemaTable is returning empty. I have read that I need to pass CommandBehavior.KeyInfo to the ExecuteReader method but I am unclear how this would look in the way I have the code structured since I am passing the dbCommand to the ExecuteReader. </p>