We help IT Professionals succeed at work.

ODBC Connection

kyleroi asked
Last Modified: 2013-12-06
I am having problems connecting to our AS/400 system via a C#.NET app.  I created a test app to reproduce the error.  Here is the code.....

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.Odbc;

namespace WindowsApplication1
    public partial class Form1 : Form
        public Form1()

        private void button1_Click(object sender, EventArgs e)
            OdbcConnection cn = new OdbcConnection();
            cn.ConnectionString = "Driver={Client Access ODBC Driver (32-bit)};System=;Uid=ADMIN1;Pwd=ADMIN1)";

When I go to open the connection I get the error below.

ERROR [28000] [IBM][iSeries Access ODBC Driver]Communication link failure. comm rc=8002 - CWBSY0002 - Password for user ADMIN1 on server is not correct, Password length = 7, Prompt Mode = Never, System IP Address =
ERROR [28000] [IBM][iSeries Access ODBC Driver]Communication link failure. comm rc=8002 - CWBSY0002 - Password for user ADMIN1 on server is not correct, Password length = 7, Prompt Mode = Never, System IP Address =

I know the connection string is correct because when I use the same connection string in FoxPro I do not receive errors.  

Any Ideas?
Watch Question


I forgot to mention that I am 100% sure this is a valid username and password.

"I am 100% sure this is a valid username and password"  ....   haha  famous  last words  just  kidding,  but keep checking that while troubleshooting,  

I noticed your AS/400 has an IP of,  is this a correct address for machines on your network?  

could I talk you into "toggling" the password from its existing one,  to a new one and see if anything changes? Then back to the original.

You did not say if you were the AS400 admin.  Do all existing apps/connections still function correctly?(except this one)    Do any other apps use the same login?


I found this.....  it may help


1. Have you checked the JDE.INI on the Windows box?
2. If you're running with Security Server, the SQL
Server login "JDE" on the Windows box has to have the
same password as the OS/400 "JDE" user on the AS/400 box.


Thank you for your response, I tried what you have mentioned but it is not helping.  It must by a C# issue because the same connection string works in FoxPro which should work in C#.  Maybe C# handles odbc differently.
Unlock this solution and get a sample of our free trial.
(No credit card required)

ill give that a try today, ill let you know if it works.


It Worked!!!!

Thanks for your help, I really wish I knew why odbc didn't work, no need for it really but it will bug me.  Anyway, thanks again.


btw... k3ht, is my non-corporate name... IE must have it stored and Firefox has this one stored... lol

wow,  Im glad it  worked,  I stumbled across it when I had nothing but trouble with ODBC.  In my opinion,  it  has too much compatability...  ( ie.  trying to be everything to everyone )

glad you are pleased


Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.