I recently went back into my Community Edition UiPath Studio to work on a project that accesses and was successfully accessing a MariaDB/MySQL database. At the Connect to database activity I was greeted with the yellow framed message “This project uses the Windows-legacy compatibility which is being phased out and will no longer be available for new projects in the next Enterprise release. Convert to windows.” When I clicked “Convert to Windows”, and all of the scrolled processing was completed, I tried to run the project. A “Runtime execution error” appeared with the following message:
Source: Connect to database
Message: Could not load file or assembly ‘Microsoft.Data.Sq|Client, Version=4.1.0.0,
Culture= neutral, PublicKeyToken=23ec7fc2d6eaa4a5’ or one of its dependencies. The system
cannot find the file specified.
Exception Type: System.IO.FileNotFoundException
What does this mean and how do I get my Database connection to work again?
Just to clarify, please refer to this post as far as support for existing legacy workflows are concerned:
This means that if you do struggle with the conversion, it is best to stick to the legacy workflow for now.
Also, the default conversion is making a copy of your project, so you should be able to easily go back to your old project
Now, as to the issue - could you please let us know the version of your Database package? Is this the latest 1.7.1 version? If not, does updating it helps to resolve this issue?
To debug things a bit more - does adding a new Connect to Database activity and configuring it from scratch help you resolve the issue?
Yes, I am using version 1.7.1 of the Database package.
My connection string (which worked before) is “Dsn=MariaDB;uid=root” and the Provider name is “System.Data.Odbc”. These still work in another UiPath project in which I use Connect to database.
But, in the project in which I get the error, even if I add a new Connect to Database activity and configure it from scratch, I still get the message Connect to database: Could not load file or assembly ‘Microsoft.Data.SqlClient, Version=4.1.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5’ or one of its dependencies. The system cannot find the file specified.
The error states syntax error, do you have a way to test your query outside ui path to see if it runs without problems? In case it does. You could try either A) use a different connector (Provider Name argument) or B) downgrade even further until you match the version that was working for you. I know that is not ideal but maybe a work around until Ui Path fix the problem
When I enterMicrosoft.Data.SqlClientin the Provider name property I get an exclamation point in a red circle. When I mouse over that red circle the follow pops up in a grey error box.