I have created a test project for Framework 4.8 where I connect to SQLBase via .NET Data Provider. For this I have included Gupta.SQLBase.Data.dll as a reference.
I have created the same program for .Net Core 3.1. The program can be compiled, but I get the following exception when connecting:
Here is the sample code:{"Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system can't find the specified file.":"System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"} System.Exception {System.IO.FileNotFoundException}
Code: Select all
using Gupta.SQLBase.Data;
using System;
namespace Bsp_05_ConnectSQLBaseDotNetCoreAdoDotNet
{
class Program
{
static void Main(string[] args)
{
try
{
string cs = "Database=TST; USERNAME=sysadm; PASSWORD=xyz; TRANSPORT=TCP; HOSTNAME=192.168.70.202; PORT=2155";
var conn = new SQLBaseConnection(cs);
conn.Open(); // The exception is triggered here.
conn.Close();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
}
ODBC and OLEDB work, but I want to use the .Net Data Provider for different reasons, but I don't succeed under .Net Core 3.1.
What is the problem and how can it be solved?
Thanks in advance!
René