PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?RGFuaWVsIFNhbnRhbmE=?=
Guest
Posts: n/a
 
      22nd Mar 2005
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.
 
Reply With Quote
 
 
 
 
Patrick Steele [MVP]
Guest
Posts: n/a
 
      23rd Mar 2005
In article <AE817B9D-B2B9-46F9-AEB9-(E-Mail Removed)>, "=?Utf-
8?B?RGFuaWVsIFNhbnRhbmE=?=" <Daniel (E-Mail Removed)>
says...
> 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+?

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
 
Reply With Quote
 
John Bailo
Guest
Posts: n/a
 
      23rd Mar 2005
Daniel Santana wrote:

> 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.
 
Reply With Quote
 
=?Utf-8?B?RGFuaWVsIFNhbnRhbmE=?=
Guest
Posts: n/a
 
      23rd Mar 2005
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!


"Patrick Steele [MVP]" wrote:

> In article <AE817B9D-B2B9-46F9-AEB9-(E-Mail Removed)>, "=?Utf-
> 8?B?RGFuaWVsIFNhbnRhbmE=?=" <Daniel (E-Mail Removed)>
> says...
> > 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+?
>
> --
> Patrick Steele
> Microsoft .NET MVP
> http://weblogs.asp.net/psteele
>

 
Reply With Quote
 
=?Utf-8?B?RGFuaWVsIFNhbnRhbmE=?=
Guest
Posts: n/a
 
      23rd Mar 2005
John Bailo,

Do you know where I can find it?

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



Tks!

"John Bailo" wrote:

> Daniel Santana wrote:
>
> > 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.
>

 
Reply With Quote
 
=?Utf-8?B?RGFuaWVsIFNhbnRhbmE=?=
Guest
Posts: n/a
 
      23rd Mar 2005
I didn't saw your first question.

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




"John Bailo" wrote:

> Daniel Santana wrote:
>
> > 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.
>

 
Reply With Quote
 
=?Utf-8?B?RGFuaWVsIFNhbnRhbmE=?=
Guest
Posts: n/a
 
      23rd Mar 2005
I finnaly got the solution....

Using the Component Services administrative tool, I disable the support for
transactions.

(Under the tab "Transactions", I selected the "disabled" option). For more
information, this link might be usefull:


http://msdn.microsoft.com/library/de...tions_5r39.asp

Thank you for everyone!
Daniel's

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Extracting data from an AS400 Database file Hal Rosser Microsoft VB .NET 0 12th Jan 2007 12:29 AM
Re: Extracting data from an AS400 Database file kgerritsen Microsoft VB .NET 0 11th Jan 2007 08:15 PM
Read and write data to and from an As400 database RD Microsoft VB .NET 0 2nd Mar 2005 09:17 PM
Excel and AS400 DB2 database Esperanza Microsoft Excel Programming 0 28th Dec 2004 09:06 PM
Function To Return Info From As400 Database Robin Flores Microsoft Excel Programming 0 21st Oct 2004 08:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:04 AM.