.NET to DB2 via iSeries

  • Thread starter Thread starter Jeff Allan
  • Start date Start date
J

Jeff Allan

Hello,

Does anyone out there have experience with connectivity to DB2 hosted on an
iSeries? I have successfully written a VB.NET 2005 WEB application to do
this but I am having a morning connection problem.

Every morning the iSeries will return an "invalid connection" error on the
first attempt of the day. After that, all other connections work fine. I
am thinking it's an iSeries issue but I can't find any data to back me up.

If you have any experience on this, please let me know.

Thanks,
Jeff
 
Hi Jeff,

Is the VB .NET application always running, or you start it on every
morning? This may help us determine if the error happens when the
application tries to connect to the database at first time, or just
randomly occur. I also suggest you may post this issue to DB2 and iSeries
newsgroup/forum, there may be some way to enable trace or log on the
database, so that we can get more detailed information about the issue.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
If you include name and password to login to your AS400 (iSeries) then you
will not have this problem). If not then you have to login to your AS400
prior to creatinf a connection. That is why the second time it runs OK. You
can create a login script to 400 that you can run on your PC startup
 
Assuming you are using the native provider which is installed with Client
Access then make sure you have the most current version. Last month I could
connection and get data back from DB2 but upon closing the application got
the strangest error which stopped when a new version of CA was installed
which must have fixed the problems for the native provider.

Sample of how I connect (if not connected then a prompt appears to connect
automatcially)
The data source is either Revenue2 or Revenue3, the default collection is
the user-login-name

Using TheConnection As New
iDB2Connection(String.Format("datasource=Revenue{1}.dor.local;DefaultCollection={0};",
CollectionName, ServerNumber))
....
 
Back
Top