You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an ArgumentException when using LinqToDB with the DB2 iSeries provider. The exception occurs when attempting to create the data connection. Below is the relevant code snippet and the exception details.
Code:
using Dapper;
using IBM.Data.DB2.iSeries;
using LinqToDB;
using LinqToDB.Data;
using LinqToDB.DataProvider.DB2iSeries;
using System;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
var connStr = "DataSource=PUB400.COM;UserId=*****;Password=*****;";
var cnn = new iDB2Connection(connStr); // from IBM.Data.DB2.iSeries.dll
var val = cnn.ExecuteScalar<int>("SELECT 42 AS VALUE FROM SYSIBM.SYSDUMMY1");
// correctly returns 42
var dc = new DataConnection(o => o.UseDB2iSeries(connStr, DB2iSeriesProviderType.AccessClient, DB2iSeriesVersion.V7_1));
// throws
}
}
}
Exception Details:
System.ArgumentException: Member 'PicoSecond' does not exist in type 'IBM.Data.DB2.iSeries.iDB2TimeStamp'
Possible Cause:
Trying to access member PicoSecond (
You are using aversion of the old "IBM i Access for Windows 7.1" driver that was decomissioned in 2019 and was replaced with the "IBM i Access - Client Solutions". The driver dates back to 2015. It seems someone managed to pack it in a nuget package and upload it to nuget, which is practical but none the less both unofficial and deprecated.
Unfortunately none of these drivers are available through nuget from IBM. So you have to download the package from here.
Thank you for the information. I have followed your instructions and downloaded the appropriate package for IBM i Access Client Solutions. After uninstalling "IBM i Access for Windows 7.1" and then installing "ACS Windows App Pkg English (64bit)", everything works perfectly.
I am encountering an ArgumentException when using LinqToDB with the DB2 iSeries provider. The exception occurs when attempting to create the data connection. Below is the relevant code snippet and the exception details.
Code:
Exception Details:
System.ArgumentException: Member 'PicoSecond' does not exist in type 'IBM.Data.DB2.iSeries.iDB2TimeStamp'
Possible Cause:
Trying to access member PicoSecond (
Linq2DB4iSeries/Source/ISeriesProvider/DB2iSeriesDataProvider.cs
Line 114 in 68a7591
Additional Information:
• LinqToDB version: 5.4
• DB2 iSeries version: V7R1
• .NET version: .NET Framework 4.7.2
The text was updated successfully, but these errors were encountered: