Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1000597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:32:19+00:00 2026-05-16T07:32:19+00:00

I would like to connect to a DB2 database, specifically an iSeries version, using

  • 0

I would like to connect to a DB2 database, specifically an iSeries version, using .Net and C# by referencing a .dll and NOT installing any software on the server. Currently we use the IBM.Data.DB2.iSeries.dll, which is installed as part of iSeries access for windows. I don’t want to have to install all of that. But apparently I don’t have an option because the other provider IBM.Data.DB2.dll also requires you to install software before it will work according to this over stackoverflow post: IBM.Data.DB2

Is there anyway to connect from .Net c# code to DB2 by simply referencing a .dll in your code and NOT installing other software on the server?

I know you can do this with Java and the JT Open toolbox (http://jt400.sourceforge.net/). Why can’t you do this with .Net?

Here is a BASIC example of how we currently use the IBM.Data.DB2.iSeries.dll.

String sql = "SELECT 1 FROM SCHEMAX.TABLEX";
System.Data.IDbConnection connection = null;
IDataReader reader = null;
try
{
connection = new iDB2Connection(ConfigurationManager.ConnectionStrings.ConnectionString);
connection.Open();
IDbCommand command = connection.CreateCommand();
command.CommandType = CommandType.Text;
command.CommandText = sql;
reader = command.ExecuteReader();
}
finally
{
try { reader.Close(); } catch (Exception ex) { }
try { connection.Close(); }catch (Exception ex) { }
}

Thanks for your time,
welzie

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:32:20+00:00Added an answer on May 16, 2026 at 7:32 am

    My question was answered in an IBM forum. Here are the answers.

    https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=77777777-0000-0000-0000-000014491597

    Answer1:
    Hi Welzie,
    While I am not familiar with the JT Open product per say, it is most likely based on a Type 4 JDBC driver, which is a Java only driver on the client side ( as opposed to older Type 2 JDBC driver which required a non-Java component on the client ). Being a Java only driver, allows JT Open to do what you’re describing.
    The .NET driver however, has a much more complicated dependency structure, and as such, requires multiple DLLs to be layed down on the client, both managed and un-managed. Moreover, connectivity to an iSeries server would also require a DB2 Connect licence to be available on the client. Therefore, the minimal client install that is required to support .NET connectivity to a DB2 server is the IBM Data Server Driver ( which is about 40 MB installed ). IBM Data Server Driver is a freely distributred client package that can be downloaded from IBM website. However, as I stated above, to connect to an iSeries server, you would need a DB2 Connect licence as well.

    Regards,
    Alex

    Answer2:
    The IBM.Data.DB2.iSeries.dll provider requires many other parts of the IBM i Access for Windows product, for example to handle the TCP/IP communications stack, security/logon handling, CCSID conversions, etc. It cannot be copied or installed as a standalone dll.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using mongoengine and would like to run connect() after settings (not inside
I would like to connect to an in-memory HSQL database instance using the hsql
I would like to connect to to irc, icq, sip, etc services using WebSockets.
I would like to connect to a clustered Oracle database described by this TNS:
I would like to connect to java process started by eclipse using a command
For example, I would like to connect to my Local DataBase if I am
I would like to use RestSharp to connect to my ASP.NET WebApi services. The
Im using dotCMIS and would like to do a simple connect to my SP2010
I'm using NHibernate to connect to an ERP database on our DB2 server. We
I would like to connect two draggable divs using jsPlumb. However when I use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.