|
|
|
|
|
|
| Author |
Message |
Yanik Reid *nix forums beginner
Joined: 13 Feb 2005
Posts: 1
|
Posted: Sun Feb 13, 2005 3:24 pm Post subject:
IBM.Data.DB2.iSeries database access problem
|
|
|
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 |
|
| Back to top |
|
 |
Karl Hanson *nix forums beginner
Joined: 19 Jul 2005
Posts: 29
|
Posted: Sun Feb 13, 2005 8:33 pm Post subject:
Re: IBM.Data.DB2.iSeries database access problem
|
|
|
Yanik Reid wrote:
| Quote: | 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
|
You may want to review the online ODBC connection string info here:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm?info/rzaik/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 |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Jan 08, 2009 3:24 am | All times are GMT
|
|
Debt Consolidation | Short Bowel Syndrome | Loans and Credit Cards | Loans | Debt Consolidation
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|