DBAS400Connector 1.1.3
See the version list below for details.
dotnet add package DBAS400Connector --version 1.1.3
NuGet\Install-Package DBAS400Connector -Version 1.1.3
<PackageReference Include="DBAS400Connector" Version="1.1.3" />
<PackageVersion Include="DBAS400Connector" Version="1.1.3" />
<PackageReference Include="DBAS400Connector" />
paket add DBAS400Connector --version 1.1.3
#r "nuget: DBAS400Connector, 1.1.3"
#addin nuget:?package=DBAS400Connector&version=1.1.3
#tool nuget:?package=DBAS400Connector&version=1.1.3
DBAS400Connector
The DBAS400Connector NuGet package enables .NET applications to connect to IBM iSeries or IBM Power systems running the OS400 operating system via ODBC. This package simplifies interaction with DB2 databases, allowing developers to execute non-query statements and retrieve data through various methods.
Key features of the DBAS400Connector include:
- Non-Query Execution: Execute SQL commands that do not return results, such as INSERT, UPDATE, and DELETE statements.
- Data Retrieval: Obtain data from the database in multiple formats, including:
- DataReader: Stream data in a forward-only manner for efficient processing.
- DataTable: Use a tabular representation of the data for easy manipulation and binding to controls.
- Lists: Convert query results to generic lists for easier handling in .NET applications.
- JSON Format: Retrieve data in JSON format for seamless integration with web applications and APIs.
With these capabilities, the DBAS400Connector makes it easier for .NET developers to work with DB2 databases on IBM iSeries systems, enhancing productivity and simplifying database interactions.
Obtaining the IBM i Access Client Solutions ODBC Driver
The IBM i Access ODBC drivers can be downloaded from the following IBM site as long as you have an account to log in to the IBM download site.
https://www.ibm.com/support/pages/ibm-i-access-client-solutions
There is an ODBC driver available that runs on Windows, Linux, MacOS and there is also a native IBM i ODBC driver available.
Sample IBM i ODBC Connection String
In order to use this connection string you must already have the IBM i Access ODBC Driver installed on your Windows, Linux or Mac computer.
How to use the connection
using DBAS400Connector;
/// <param name="drivers">IBM drivers ODBC to use example: iSeries Access ODBC Driver</param>
/// <param name="systemHost">iSeries host name or IP address</param>
/// <param name="userId">iSeries user ID</param>
/// <param name="password">iSeries password</param>
bool status = connector.OpenConnection(“Client Access ODBC Driver”, “192.168.0.1”, “myuser”,”mypassword”);
// if status = true the connection was successfully, status = false The connection was not successfully
Execute Trasact Select into iSeries and get DataTable
DataTable _mytable = new DataTable("mydatatableresult");
String txtsql = “SELECT ORDINAL_POSITION AS POS,SYSTEM_SCHEMA_NAME AS LIBRARY,TYPE,CAST(TEXT_DESCRIPTION AS CHAR(50)) AS TEXT FROM QSYS2.LIBRARY_LIST_INFO”;
_mytable = connector.ExecuteQueryToDataTable(txtsql);
string txt = connector.GetLastError(); // If the transaction has errors, this variable will contain the error, otherwise it will be empty.
Execute Trasact Select into iSeries and get Json Object
DataTable _mytable = new DataTable("mydatatableresult");
_mytable = connector.ExecuteQueryToDataTable(txtsql);
string txt = connector.GetLastError(); // If the transaction has errors, this variable will contain the error, otherwise it will be empty.
var contenidojson = connector.GetQueryResultsDataTableToJsonString(false, true, "recordsjson", true);
Sample IBM i Connection Strings
https://www.connectionstrings.com/ibm-i-access-odbc-driver/
Application developed for connection to iSeries and use of SQL commands in DB2 using NuGet
https://www.mediafire.com/file/ur6yhkglnxcyr7a/DB2Tool+iSeries.rar/file

Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
- System.Data.Odbc (>= 10.0.0-preview.1.25080.5)
- System.Text.Json (>= 10.0.0-preview.1.25080.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.