cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
matt_b
Frequent Visitor

"OLE DB or ODBC Error" when connecting to Azure SQL with parameters for server/database

Hi!

 

I need to connect Power BI to an Azure SQL database.  If I enter the server name and database directly into the "SQL Server database" dialog, it connects, prompts me for credentials, allows me to select tables, and subsequently imports data just fine.

   

2022-12-09_09h43_53.png

 

However, if I enter the server and database name as parameters, and use the exact same server and db names as the "current value" of the parameters, I get the same table selection options, and can see data previews, as before, but when Power BI tries to import the data, I get the following error: "Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [Expression.Error] The import serverName matches no exports. Did you miss a module reference?" for every table I try to import.  serverName there is the name I gave to the server parameter.

2022-12-09_09h41_34.png

 

Can anyone help?

3 REPLIES 3
v-jialluo-msft
Community Support
Community Support

Hi  @matt_b ,

 

From your description, your question is an error when connecting to a data source using parameters.
You can try changing the parameter type to any, which may solve the problem, I tested locally that I can connect to the database.

vjialluomsft_0-1670833291318.png

vjialluomsft_1-1670833305859.png

vjialluomsft_2-1670833316239.png

 

 

Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I get the exact same error when I used "Any" as the parameter type.  So, no, thank you, but that doesn't help.

 

If it had worked I would still have a problem, because I need to be able to update these parameter values via the Power BI Rest API when the report gets uploaded into Power BI Services - and that isn't possible with a parameter type of "Any".

matt_b
Frequent Visitor

I meant to add a screenshot of how I'm entering the database details as parameters.  Here it is: 2022-12-09_09h43_07.png

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.