Save Big on Cyber Monday! Up to 40% Off
ends in   {{days}}
Days
{{timeFormat.hours}}
:
{{timeFormat.minutes}}
:
{{timeFormat.seconds}}

Getting Started With dotConnect Universal

Below are some resources to help you maximize your experience with dotConnect Universal.

dotConnect Universal is an all-encompassing enterprise-grade connector that applies a unified code base to enable access to multiple database systems in .NET applications of all levels.

  • Universal access to the data source
  • Access to data sources via ADO.NET, OLE DB, and ODBC providers
  • Full compliance with ADO.NET standards
  • UniSQL for writing server-independent queries
  • Design-time extensions and wizards
  • Support for native data types, classes, and structures
  • Integration with Visual Studio

Code examples

using Devart.Data.Universal;

string connectionString =
    "Provider=SQL Server;" +
    "Data Source=SERVER;" +
    "Initial Catalog=Northwind;" +
    "User ID=TestUser;" +
    "License Key=**********";

using var connection = new UniConnection(connectionString);

try
{
    connection.Open();

    using var command = connection.CreateCommand();
    command.CommandText = "SELECT actor_id, first_name, last_name FROM actor";
    using var reader = command.ExecuteReader();

    Console.WriteLine("Actors:");
    while (reader.Read())
    {
        var id = reader.GetInt32(0);
        var firstName = reader.GetString(1);
        var lastName = reader.GetString(2);
        Console.WriteLine($"{id}: {firstName} {lastName}");
    }
}
catch (Exception ex)
{
    Console.WriteLine("Error while connecting or executing query:");
    Console.WriteLine(ex.Message);
    Environment.ExitCode = 1;
}
finally
{
    if (connection.State != System.Data.ConnectionState.Closed)
    {
        connection.Close();
    }
}
PM> Install-Package Devart.Data.Universal.SqlServer
using Devart.Data.Universal;

string connectionString =
    "Provider=Oracle;" +
    "Direct=True;" +
    "Host=127.0.0.1;" +
    "Service Name=TestDb;" +
    "User ID=TestUser;" +
    "Password=TestPassword;" +
    "License Key=**********";


using var connection = new UniConnection(connectionString);


try
{
    connection.Open();


    using var command = connection.CreateCommand();
    command.CommandText = "SELECT actor_id, first_name, last_name FROM actor FETCH FIRST 5 ROWS ONLY";
    using var reader = command.ExecuteReader();


    Console.WriteLine("Top 5 actors:");
    while (reader.Read())
    {
        var id = reader.GetInt32(0);
        var firstName = reader.IsDBNull(1) ? "" : reader.GetString(1);
        var lastName = reader.IsDBNull(2) ? "" : reader.GetString(2);
        Console.WriteLine($"{id}: {firstName} {lastName}");
    }
}
catch (Exception ex)
{
    Console.WriteLine("Error while connecting or executing query:");
    Console.WriteLine(ex.Message);
    Environment.ExitCode = 1;
}
finally
{
    if (connection.State != System.Data.ConnectionState.Closed)
    {
        connection.Close();
    }
}
PM> Install-Package Devart.Data.Universal.Oracle
using Devart.Data.Universal;

string connectionString =
    "Provider=MySQL;" +
    "Server=127.0.0.1;" +
    "Port=3306;" +
    "User ID=TestUser;" +
    "Password=TestPassword;" +
    "Database=sakila;" +
    "License Key=**********";

using var connection = new UniConnection(connectionString);

try
{
    connection.Open();

    using var command = connection.CreateCommand();
    command.CommandText = "SELECT actor_id, first_name, last_name FROM actor";
    using var reader = command.ExecuteReader();

    Console.WriteLine("Top 5 actors:");
    while (reader.Read())
    {
        var id = reader.GetInt32(0);
        var firstName = reader.GetString(1);
        var lastName = reader.GetString(2);
        Console.WriteLine($"{id}: {firstName} {lastName}");
    }
}
catch (Exception ex)
{
    Console.WriteLine("Error while connecting or executing query:");
    Console.WriteLine(ex.Message);
    Environment.ExitCode = 1;
}
finally
{
    if (connection.State != System.Data.ConnectionState.Closed)
    {
        connection.Close();
    }
}
PM> Install-Package Devart.Data.Universal.MySql
using Devart.Data.Universal;

string connectionString =
    "Provider=PostgreSQL;" +
    "Host=127.0.0.1;" +
    "Port=5432;" +
    "User Id=TestUser;" +
    "Password=TestPassword;" +
    "Database=TestDatabase;" +
    "Initial Schema=Public;" +
    "License Key=**********";

using var connection = new UniConnection(connectionString);

try
{
    connection.Open();

    using var command = connection.CreateCommand();
    command.CommandText = "SELECT actor_id, first_name, last_name FROM actor ORDER BY actor_id LIMIT 5";
    using var reader = command.ExecuteReader();

    Console.WriteLine("Top 5 actors:");
    while (reader.Read())
    {
        var id = reader.GetInt32(0);
        var firstName = reader.GetString(1);
        var lastName = reader.GetString(2);
        Console.WriteLine($"{id}: {firstName} {lastName}");
    }
}
catch (Exception ex)
{
    Console.WriteLine("Error while connecting or executing query:");
    Console.WriteLine(ex.Message);
    Environment.ExitCode = 1;
}
finally
{
    if (connection.State != System.Data.ConnectionState.Closed)
    {
        connection.Close();
    }
}
PM> Install-Package Devart.Data.Universal.PostgreSql
using Devart.Data.Universal;

string connectionString =
    "Provider=SQLite;" +
    "Data Source=myDatabase.db;" +
    "FailIfMissing=False;" +
    "License Key=**********";

using var connection = new UniConnection(connectionString);

try
{
    connection.Open();

    using var command = connection.CreateCommand();
    command.CommandText = "SELECT actor_id, first_name, last_name FROM actor LIMIT 5";
    using var reader = command.ExecuteReader();

    Console.WriteLine("Top 5 actors:");
    while (reader.Read())
    {
        var id = reader.GetInt32(0);
        var firstName = reader.GetString(1);
        var lastName = reader.GetString(2);
        Console.WriteLine($"{id}: {firstName} {lastName}");
    }
}
catch (Exception ex)
{
    Console.WriteLine("Error while connecting or executing query:");
    Console.WriteLine(ex.Message);
    Environment.ExitCode = 1;
}
finally
{
    if (connection.State != System.Data.ConnectionState.Closed)
    {
        connection.Close();
    }
}
PM > Install-Package Devart.Data.Universal.SQLite
using Devart.Data.Universal;

string connectionString =
    "Provider=MS Access;" +
    "Data Source=127.0.0.1;" +
    "User ID=TestUser;" +
    "Password=TestPassword;" +
    "Database=TestDb;" +
    "License Key=**********";

using var connection = new UniConnection(connectionString);

try
{
    connection.Open();

    using var command = connection.CreateCommand();
    command.CommandText = "SELECT actor_id, first_name, last_name FROM actor";
    using var reader = command.ExecuteReader();

    Console.WriteLine("Actors:");
    while (reader.Read())
    {
        var id = reader.GetInt32(0);
        var firstName = reader.GetString(1);
        var lastName = reader.GetString(2);
        Console.WriteLine($"{id}: {firstName} {lastName}");
    }
}
catch (Exception ex)
{
    Console.WriteLine("Error while connecting or executing query:");
    Console.WriteLine(ex.Message);
    Environment.ExitCode = 1;
}
finally
{
    if (connection.State != System.Data.ConnectionState.Closed)
    {
        connection.Close();
    }
}
PM> Install-Package Devart.Data.Universal.OleDb
using Devart.Data.Universal;

string connectionString =
    "Provider=ODBC;" +
    "Dsn=MyDsn;" +
    "User ID=TestUser;" +
    "Password=TestPassword;" +
    "License Key=**********";

using var connection = new UniConnection(connectionString);

try
{
    connection.Open();

    using var command = connection.CreateCommand();
    command.CommandText = "SELECT actor_id, first_name, last_name FROM actor";
    using var reader = command.ExecuteReader();

    Console.WriteLine("Actors:");
    while (reader.Read())
    {
        var id = reader.GetInt32(0);
        var firstName = reader.GetString(1);
        var lastName = reader.GetString(2);
        Console.WriteLine($"{id}: {firstName} {lastName}");
    }
}
catch (Exception ex)
{
    Console.WriteLine("Error while connecting or executing query:");
    Console.WriteLine(ex.Message);
    Environment.ExitCode = 1;
}
finally
{
    if (connection.State != System.Data.ConnectionState.Closed)
    {
        connection.Close();
    }
}
PM> Install-Package Devart.Data.Universal.Odbc

Documentation

Licensing
Licensing
A detailed technical reference on embedding license information - a required resource for applications built with dotConnect Universal.
DataAdapter Features
DataAdapter features
A guide to using the UniDataAdapter class for interacting with data in a disconnected architecture.
Parameters
Parameters
An overview of SQL query parameters and their synchronization, along with practical insights into working with stored procedures.
Transactions
Using transactions
A guide on using transactions in dotConnect Universal, covering local and distributed transactions that ensure atomic "all-or-nothing" operations.

dotConnect Universal

Get universal access to data from a variety of sources, including SQL Server, Oracle, PostgreSQL, MySQL, SQLite, DB2, InterBase, Microsoft Access, and Firebird. Other servers can be accessed through their ADO.NET, OLE DB and ODBC providers.

FAQ

What is the trial period for dotConnect Universal?
dotConnect Universal offers a fully functional 30-day trial. During this period, you can use and evaluate all features without limitations. After the trial ends, you can purchase a license to keep using the product.
Why do I need to install the product if NuGet is available?

dotConnect Universal provides two sets of assemblies, and the choice depends on your project type:

  • For .NET (.NET Core/.NET 5+) projects: Use the assemblies available via NuGet packages.
  • For .NET Framework projects: Use the Devart assemblies included with the product installer.
Where should I apply my License Key?

The method for applying your license depends on your project type:

  • For .NET (.NET Core/.NET 5+) projects, apply the License Key at runtime using the License Key connection string parameter.
  • For .NET Framework projects, no license key is needed. Simply download and install the licensed version of dotConnect from your Devart Customer Portal.
Do end users of my application need a Devart license, or do I have to pay additional fees for deploying my software?

No, end users do not need a Devart license, and there are no additional deployment fees, as long as you hold a valid Devart license.

According to the EULA, you're allowed to redistribute the following runtime assemblies with your application:

  • Devart.Data.Universal.dll
  • Devart.Data.dll

You can include them in your app's folder (such as Bin for web apps) or register them in the GAC. Just make sure they are only used by your solution.

There's no need for a full installation on the target machine, you can also use the "Minimal installation" option provided by the setup.

No other components of dotConnect may be distributed.

How can I update dotConnect to a new version?

To update dotConnect to a new version, you need to reinstall it:

  1. Open Settings > Apps > Installed apps in Windows.
  2. Uninstall the current and any older versions of dotConnect, including Entity Developer and LinqConnect, if installed.
  3. Visit the Customer Portal and download the latest licensed version.
  4. Install the downloaded version and receive the latest features and improvements.
How can I completely remove all previous versions of a product?
  1. Go to Settings > Apps > Installed apps and uninstall:
    • All dotConnect providers
    • Entity Developer
    • LinqConnect
  2. Manually delete any leftover files from the following locations (if they exist):

    GAC folders:

    • C:\Windows\assembly\GAC_MSIL
    • C:\Windows\Microsoft.NET\assembly\GAC_MSIL

    Program files and extensions:

    • C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Devart
    • C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Devart
    • C:\Program Files (x86)\Devart
    • C:\Program Files\Devart
    • C:\Program Files (x86)\Common Files\Devart
    • C:\Program Files\Common Files\Devart

    Program data folders:

    • C:\ProgramData\Devart\dotConnect
    • C:\ProgramData\Devart\Entity Developer
    • C:\ProgramData\Devart\EntityDeveloper

    Removing these ensures a clean system and prevents conflicts during future installations.

Discover the ultimate capabilities of dotConnect Universal Download free trial