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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
v-yiruan-msft
Community Support
Community Support

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.