AS400 database access over COM+ (ADO.Net + C#)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, could anyone help me?

When I want to access AS400 database i use some code like the following:

{
string strDataSource = "128.2.2.2";
string strDBUser = "dbUser";
string strDBPass = "dbPass";

OleDbConnection objConnection = new OleDbConnection
("Provider=IBMDA400.DataSource.1; Data Source=" + strDataSource
+ ";User Id=" + strDBUser + "; Password=" + strDBPass);

objConnection.Open();

string strSelectCommand = "SELECT * FROM collection.table";

OleDbDataAdapter objDataAdapter = new OleDbDataAdapter(strSelectCommand,
objConnection);

DataTable objDataTable = new DataTable();
objDataAdapter.Fill(objDataTable);

objConnection.Close();
}

Everything just goes fine till today...

Just because I need to get data from AS400 database and store each query
result as MSMQ entry. In order to acomplish this, I wrote one dll COM+ (to be
accessed by the Biztalk 2002) and when I go to the test, I got the following
error when I execute the " objConnection.Open();" command:

"No error information available E_NOINTERFACE(0x80004002)"

The only diference between the two dll's is that one is in COM+ and the
first one Isn't.

Someone knows if there's any issue between ADO.Net and COM+ ? Or COM+ with
OleDB?



Thanks in Advance.
Daniel Santana.
 
8?B?RGFuaWVsIFNhbnRhbmE=?= said:
Just because I need to get data from AS400 database and store each query
result as MSMQ entry. In order to acomplish this, I wrote one dll COM+ (to be
accessed by the Biztalk 2002) and when I go to the test, I got the following
error when I execute the " objConnection.Open();" command:

"No error information available E_NOINTERFACE(0x80004002)"

The only diference between the two dll's is that one is in COM+ and the
first one Isn't.

Someone knows if there's any issue between ADO.Net and COM+ ? Or COM+ with
OleDB?

Does your .NET component inherit from the ServicedComponent class? Did
you use regsvcs.exe to register it with COM+?
 
Daniel said:
Just because I need to get data from AS400 database and store each query
result as MSMQ entry. In order to acomplish this, I wrote one dll COM+ (to be

Why did you write a COM+ dll? Can't you use a .NET dll with BizTalk?
Or use a Web Method?

Also, did you know there are now native .NET drivers for AS/400/DB2 that
come with the iSeries client access utilities, so you don't have to use
OleDb.
 
Yes Patrick.... About COM+, everything is just fine... I follow the steps to
get my dll registered and, at the end, I used the regsvcs.exe application.
All in the dll but the OleDb suff is working fine .


Tks!
 
John Bailo,

Do you know where I can find it?

Sorry.... but I`m new in As400 "world"...



Tks!
 
I didn't saw your first question.

The biztalk 2000/2002 just works with COM+ components or vbs files.
 
Back
Top