Thanks Alex for all of your help -- It seems to be working for me now. Here is what I did:
From Windows:
Go into Admin Tools > Data Sources (ODBC)
Select the System DSN Tab and Add a new System Data Source
Select the ODBC driver used to connect to the AS400
Give it a Data Source Name, AS400...
oops -- you're right.
When I pasted my code over I 'cleaned' it up a bit by removing parts I didn't need to show - and I removed the "using System.Data.OleDb;" on accident instead of "using System.Data.Odbc;".
I am actually using the System.Data.OleDb in my code -- and I still get that error.
Sure -- it isn't much more than what I posted (I'm trying to keep it simple until I figure this out ...)
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Odbc;
namespace Project1
{
class Class1
{
public static void Main()
{...
I added Force Translate to the Connection String with the same results.
I entered my password when I created the Connection - it doesn't prompt me for it to connect through the Server Explorer -- but it doesn't add it to the Connection String.
I am trying to connect to an AS400 database from C# code and cannot find what I am doing wrong.
This is the error that I get (thrown by the conn.Open()):
"Non-NULL controlling IUnknown was specified, and either the requested interface was not IUnknown, or the provider does not support COM...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.