![]() |
VOOZH | about |
dotnet add package linq2db4iSeries --version 6.3.0
NuGet\Install-Package linq2db4iSeries -Version 6.3.0
<PackageReference Include="linq2db4iSeries" Version="6.3.0" />
<PackageVersion Include="linq2db4iSeries" Version="6.3.0" />Directory.Packages.props
<PackageReference Include="linq2db4iSeries" />Project file
paket add linq2db4iSeries --version 6.3.0
#r "nuget: linq2db4iSeries, 6.3.0"
#:package linq2db4iSeries@6.3.0
#addin nuget:?package=linq2db4iSeries&version=6.3.0Install as a Cake Addin
#tool nuget:?package=linq2db4iSeries&version=6.3.0Install as a Cake Tool
This is a provider for Linq2DB to allow access to DB2 running on an IBM iSeries (AS/400) server.
Installing the Linq2Db4iSeries NuGetPackage will automatically install the Linq2Db package.
The IBM i Series ADO.net providers (Native, ODBC, Oledb) are included with iSeries Access Client Solutions for Windows package(https://www-01.ibm.com/marketing/iwm/platform/mrs/assets?source=swg-ia) which will need to be installed onto each machine that runs the software. The ODBC driver is also available for linux.
For the DB2 ADO.net providers there are the following options
For DB2Connect a license file is required (named db2consv_ee.lic). For the full IBM Data Server Client the license can be installed using the license manager application included with the package (db2licm -a <license_file>). For the nuget packages, the license file should be placed in the clidriver/license folder under the application base folder.
To include DB2 drivers properly, check the linq2db.Providers.props files in this repository for the relevant target frameworks.
This package includes 4 Linq2db DataProviders, each based on one of the three .net data providers included in the afformentioned IBM provider package
Access Client native Ado.Net provider This provider provides the great compatibility but is only available for .net framework. This is the only provider supported on versions up to 2.9.x
Access Client ODBC provider This provider is advertised by IBM as the most efficient and does seem to be faster than the .net native provider. However it does not support the XML data type properly. Specifically, any schema calls on datareaders that access an XML column throw an exception. There are a few workarounds applied that will make most scenarios work but there are others that break.
Access Client OleDb provider This provider is similar to the ODBC provider but fails on x86 and has a few other quirks.
DB2 provider (via DB2Connect) This provider uses the same interface as the standard DB2 provider and supports .net framework and .net core (x64 only for core). It is feature rich, maintained by IBM and is available through nuget. However it requires a commercial license.
The recommended provider is DB2Connect if a license can be obtained, as it provides the best compatibility and is available through nuget packages. Otherwise the native .net provider is great if you're still on .net Framework. The OleDb and ODBC providers are a good choice if you want .net core/standard compatibility but cannot get a DB2Connect license. The ODBC provider has issues with XML columns and the OleDb provider only works on x64. The OleDb provider also had some SQL quirks that are handled in the library code (required spaces in specific places) so use with caution.
For more info on providers see the provider known issue and quirks wiki artice
For more info on IBM's comments on the ODBC and OleDb providers see: https://www.ibm.com/support/pages/oledb-ole-db-and-odbc-positioning
Usage is exactly the same as Linq2DB. See https://github.com/linq2db/linq2db/blob/master/README.md for examples.
Valid ProviderNames for this provider are defined as constants in the DB2iSeriesProviderName static class.
Data Source={SERVER_NAME}; Persist Security Info=True;User ID={USER_ID};Password={PASSWORD};Library List={LIBRARY_LIST};Default Collection={DEFAULT_LIBRARY};Naming=0"
Driver={IBM i Access ODBC Driver};System={SERVER_NAME};Uid={USER_ID};Pwd={PASSWORD};NAM=0;UNICODESQL=1;MAXDECSCALE=63;MAXDECPREC=63;GRAPHIC=1;MAPDECIMALFLOATDESCRIBE=3;MAXFIELDLEN=2097152;ALLOWUNSCHAR=1;DBQ={LIBRARY_LIST}
For more info see: https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzaik/connectkeywords.htm#connectkeywords__note1
Provider=IBMDA400;Data Source={SERVER_NAME};User Id={USER_ID};Password={PASSWORD};Default Collection={DEFAULT_LIBRARY};Convert Date Time To Char=TRUE;LIBRARY LIST={LIBRARY_LIST};Maximum Decimal Precision=63;Maximum Decimal Scale=63;Naming Convention=0;Keep Trailing Blanks=TRUE
For more info see: https://www.ibm.com/support/pages/access-client-solutions-ole-db-custom-connection-properties
Database={SERVER_NAME};User ID={USER_ID};Password={PASSWORD};Server={SERVER_NAME}:{SERVER_PORT};LibraryList={LIBRARY_LIST};CurrentSchema=
{DEFAULT_LIBRARY}
Supported providers are:
The provider can create SQL compatible with V7.1 and above.
To have the provider support these features this new features select the appropriate version in the DB2iSeriesOptions.
DB2 doesn't have a GUID type. By default GUIDs will be stored as CHAR(16) FOR BIT DATA. This works and is probably the most efficient however it is unreadable when queried directly.
Using a "*GAS" provider will save the GUID in clear text. The underlying column should be set to VARCHAR(38) data type.
The provider supports the following table hints:
table.TableHint(DB2iSeriesTableHints.OverridingSystemValue).Insert(() => new TableEntity { ... });
See https://github.com/LinqToDB4iSeries/Linq2DB4iSeries/wiki for further information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 1 NuGet packages that depend on linq2db4iSeries:
| Package | Downloads |
|---|---|
|
linq2db.LINQPad
Supported databases: IBM DB2 LUW/zOS/iSeries, Firebird, IBM Informix, Microsoft Access, Microsoft Sql Server (+Azure), Microsoft Sql Server Compact, MySql, MariaDB, Oracle, PostgreSQL, SQLite, SAP HANA, SAP/Sybase ASE, ClickHouse. |
Showing the top 1 popular GitHub repositories that depend on linq2db4iSeries:
| Repository | Stars |
|---|---|
|
linq2db/linq2db
Linq to database provider.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 6.3.0 | 65 | 6/14/2026 |
| 6.2.1 | 7,908 | 4/25/2026 |
| 6.1.0 | 4,530 | 12/15/2025 |
| 6.0.0 | 1,141 | 12/13/2025 |
| 5.4.0 | 118,102 | 3/26/2024 |
| 5.1.1 | 3,843 | 4/2/2023 |
| 5.1.0 | 316 | 3/22/2023 |
| 5.0.0 | 6,299 | 2/24/2023 |
| 4.4.1 | 736 | 2/6/2023 |
| 4.3.0 | 1,127 | 10/6/2022 |
| 4.2.0 | 690 | 9/22/2022 |
| 4.0.1.1 | 650 | 9/18/2022 |
| 4.0.1 | 1,006 | 6/1/2022 |
| 3.7.0 | 1,233 | 5/29/2022 |
| 3.6.0 | 2,480 | 12/9/2021 |
| 3.3.0 | 1,029 | 11/19/2021 |
| 3.1.6.1 | 13,944 | 1/9/2021 |
| 3.1.6 | 952 | 11/21/2020 |
| 3.1.5 | 689 | 10/22/2020 |
| 2.9.0 | 1,466 | 9/3/2019 |