Database activities not working with Windows-Compatibility project

Database activities not working with Windows project, it works fine in Windows Legacy

Title: "Error: The specified invariant name 'System.Data.OracleClient' wasn't found in UiPath.Database.Activities 1.7.1"


Description:


When using UiPath.Database.Activities 1.7.1 in a Windows-Compatibility project, you may encounter the following error message: "Connect to database: The specified invariant name 'System.Data.OracleClient' wasn't found in the list of registered .NET Data Providers." This error occurs even when you have configured the Oracle driver correctly.

Cause:

The cause of this error is a change in the SQL client dependency used by UiPath.Database.Activities between versions 1.5 and 1.7.1:

  • UiPath.Database.Activities 1.5 used System.Data.SqlClient.
  • UiPath.Database.Activities 1.7.1 uses Microsoft.Data.SqlClient.

Resolution:


To resolve this issue and make UiPath.Database.Activities 1.7.1 work with an Oracle database, follow these steps:

  1. Open your UiPath project in Windows-Compatibility mode.
  2. Locate the Connect activity where you are connecting to the Oracle database.
  3. In the Properties panel, find the "Provider Name" property, and change it to "Oracle.ManagedDataAccess.Client."
  4. Save your project.

By changing the Provider Name to "Oracle.ManagedDataAccess.Client," you are specifying the Oracle Data Provider for .NET. This ensures that UiPath.Database.Activities 1.7.1 can correctly connect to your Oracle database.


This solution should resolve the error and allow you to work with Oracle databases using UiPath.Database.Activities 1.7.1 in a Windows-Compatibility project.