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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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