SQL Run query - Missing provider Error

Hi, after migrating from “Windows Legacy” to “Windows” project in Uipath, I have a problem with connecting to our Sql database. There is an error with Sql Provider, which was previously working:

I have read that this connected with new .Net settings, so I’ve tried to import that namespace again and also, I have imported “Microsoft.Data.SqlClient”:

But after that, I’ve started to getting another error:

So I don’t know what is the problem here, no Sql settings were changed.
How can I overcome this error in new Studio projects, since I need to connect to our Database?

Hi @Piotr_Gajewski

Have you also updated the Database package to the latest 1.7.1 version?

Hi Maciek, yes, database packages are up to date (v1.71).

Could you please double check that this is set like so:

Create a new Connect to Database activity in the Windows project compatibility and use the Wizard to build again the Microsoft.Data.SqlClient connection.

Let us know the results.

So I have double checked imports and they look good:


I also tried to use “Connect to database” activity, but with no success:

Error message: “A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SNI_PN11, error: 26 - Error Locating Server/Instance Specified)”

Another thing that I’ve just noticed when checking console/output during the compilation, there was an error (which is not stopping the program to compile). I’m not sure what is means and how to solve it, but it seems, thats it is connected with sql activity somehow: