DBAS400Connector 1.1.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package DBAS400Connector --version 1.1.3
                    
NuGet\Install-Package DBAS400Connector -Version 1.1.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DBAS400Connector" Version="1.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DBAS400Connector" Version="1.1.3" />
                    
Directory.Packages.props
<PackageReference Include="DBAS400Connector" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DBAS400Connector --version 1.1.3
                    
#r "nuget: DBAS400Connector, 1.1.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=DBAS400Connector&version=1.1.3
                    
Install DBAS400Connector as a Cake Addin
#tool nuget:?package=DBAS400Connector&version=1.1.3
                    
Install DBAS400Connector as a Cake Tool

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.

alternate text is missing from this package README image

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);

alternate text is missing from this package README image

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

![Interfaz de usuario gráfica, Texto, Aplicación, Correo electrónico

Descripción generada automáticamente](Aspose.Words.e49bdc48-5e8b-40d8-8b75-d3e63ebf8f36.003.png)

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.4 67 3 days ago
1.1.3 114 20 days ago
1.1.2 110 20 days ago
1.1.1 120 21 days ago
1.0.0 134 a month ago