Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2005

Tip: Looking for answers? Try searching our database.

IBM.Data.DB2.iSeries database access problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Yanik Reid - 13 Feb 2005 16:24 GMT
When I run the following vb.net code, I'm not able to acces the my database
AMFLIB.

I use to be able to access AMFLIB with the old ODBC driver from IBM iSeries
Access but now I want to use the new managed IBM.Data.DB2.iSeries data
provider from iSeries Access V5R3.

When I remove Database=AMFLIB from the connection string, I can connect but
as soon as I try to specify a known database (like my good old AMFLIB) I get
the following error:

IBM.Data.DB2.iSeries.iDB2ConnectionFailedException
"The connection cannot be opened because an error ocurred."

I'm running IBM iSeries Access V5R3 and my server is V5R2.

When I don't specify a database, after the connection is open the database
property is set to AS400REM. I don't know if this database is a real
database specific to my company.

******************************************
Imports IBM.Data.DB2.iSeries

Dim cn As New iDB2Connection

Try
  TestConnection.ConnectionString = _
  "DataSource=AS400;UserID=xxxx;Password=xxxx;Database=AMFLIB"

  TestConnection.Open()
  If TestConnection.State = ConnectionState.Open Then
     MsgBox("Database: " & TestConnection.Database)
     TestConnection.Close()
  End If
Catch ex As Exception
  MsgBox(ex.Message)
End Try
******************************************

Thanks to all
Karl Hanson - 13 Feb 2005 21:33 GMT
> When I run the following vb.net code, I'm not able to acces the my database
> AMFLIB.
[quoted text clipped - 36 lines]
>
> Thanks to all

You may want to review the online ODBC connection string info here:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm?info/rzai
k/rzaik15.htm


It appears that DATABASE refers to the RDB name, not a specific library
(schema/collection).  You can determine the local RDB name by using the
WRKRDBDIRE command on an iSeries command line - see the entry designated
*LOCAL.  You should also see the local RDB name using iSeries Navigator,
under the Databases tab in the left pane, when connected to the desired
iSeries system.

--

Karl Hanson
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.