the below Query gets executed in my SQL DB
WITH XMLNAMESPACES(DEFAULT 'http://schemas.datacontract.org/2004/07/Shared.ViewModels.Warehouse')
selectt.bondId,t.bondName,x.inf.value('(ExpDate)[1]', 'datetime2') as ExpDatefrom MyTable as tcross apply(select cast(t.BondXMLinfo as xml) as BondXMLinfo) as cacross apply ca.BondXMLinfo.nodes('/CompanyInfo') as x(inf)
but, When I try to execute the same SQL Query using SqlDataReader from C#.NET, i get empty output in DataTable.
using (SqlCommand myCommand = new SqlCommand(<MYSQLQuery>, connection, transaction)){using (SqlDataReader myReader = myCommand.ExecuteReader()){DataTable myTable = new DataTable();myTable.Load(myReader);