IsAliased always null in GetSchemaTable

123 Views Asked by At

GetSchemaTable() always returns IsAliased as null, and BaseColumnName is always the same as ColumnName, even though I have used an alias name to fetch column data from Stored Procedure.

SP:

SELECT u.Name AS [Display Name]  
  ,code AS [Display Code]
........

C#:

DbDataReader reader = null;
DataTable dt = reader.GetSchemaTable();
1

There are 1 best solutions below

0
On

Was able to solve the issue by adding commandBehavior