Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

DataSource Error: Already an Open DataReader

Hello! I am using the Business Central On Prem connector in Power BI Desktop and have started to import my queries. When I import them and Power BI Desktop evaluates them they load in fine, however when I go to refresh the data I am gettting the following error. 

 

OLE DB or ODBC error: [DataSource.Error] Dynamics 365 Business Central (on-premises): Request failed: The remote server returned an error: (400) Bad Request. (The following SQL error occurred after the SQL command was canceled: There is already an open DataReader associated with this Command which must be closed first. CorrelationId: 0cabaa74-52c8-48d8-9a51-e68981a7dac3.).

 

Does anyone know how to fix this? Or why it is happening?

 

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Please review the following threads which has the similar problem as yours, hope they can also help you resolve the problem.

Add Business Central as a data source in Power BI Desktop

Refresh the data sources, report file, then republish the report to Service

The command has been canceled

OK - I may answer my own question here.  I think that the issue is that the dataset which reports the "failure" may not be the actual dataset causing the failure.

e.g.  If you are refreshing 10 datasets in redshift and 1 has an error, e..g in my case a changed column name.  This error could also prevent other datasets from loading, and the one which gets reported as the "Command has been cancelled" might just be an innocent victim of another issue.

My redshift connector is now refreshing again so I am happy chap..

 

My recommendation is to use the Desktop to refresh, and if this still works, republish the report to ensure that all the schemas are in sync.


The command has been canceled


Hi, I solve the problem. My source is a excel, in that excel has many connections (database, csv file, sharepoint), that excel is uploaded to one drive, and is used in power bi.

The solutions was, i refresh all the data and conections on that excel (it take a long time), and then i refesh de data model on power bi, and it works.

I don't know why power bi not explains the error on detail, only show "the command has been canceled", too poor information to resolve the problem.


"There is already an open DataReader associated with this Command which must be close " on test server but not in my local machine

Best Regards

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors