Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Let's say I have this MDX query against SQL Server's Analysis Service Adventure Works sample:
select [Measures].[Customer Count] on columns, [Date].[Calendar Quarter of Year] on rows from [Adventure Works]
And I execute it as:
var reader = new AdomdCommand("...").ExecuteReader();
I would expect that
reader.GetFieldType(0);would return System.Int32, but it returns System.Object. The same is true if I query schema with reader.GetSchemaTable() which is no surprise as I assume the former gets data from later. I also assume this is probably not an exclusive .NET issue. The same is at least true for .NET Framework.
So, is there a way I can get those types when I do a query?
I guess it's related to both and I don't think Adomd client is doing anything significant except for retrieving schema from SQL server. But anyway, I will post there as well.
Hi @mihies,
According to your description, I think this requirement is more related to use ADO.NET to getting data from SQL server.
For this scenario, I'd like to suggest you post those at the forum to get further support.
Regards,
Xiaoxin Sheng
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |