I am writing an AWS Lambda function in Visual Studio 2017 and C# that needs to execute an Exasol script. I think my problem is figuring out which Assemblies and NuGet packages to reference.
I’ve installed: EXASolution_ADO.NET-5.0.17.msi and I’m referencing Microsoft.NETCore.app 1.0, System.Data.Common and EXADataProvider.dll.
In this code:
var exasolCnx = new Exasol.EXADataProvider.EXAConnection();
var exasolCmd = exasolCnx.CreateCommand();
The first line works and gives me a EXAConnection object.
The second line gives two compile errors:
- The type 'DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
- 'EXAConnection' does not contain a definition for 'CreateCommand' and no extension method 'CreateCommand' accepting a first argument of type 'EXAConnection' could be found (are you missing a using directive or an assembly reference?)
Do I really need to dig up a reference to System.Data version 2.0.0.0? The oldest readily available version on NuGet is 4.0.