niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » IBM DB2
IBM.Data.DB2.iSeries database access problem
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
Yanik Reid
*nix forums beginner


Joined: 13 Feb 2005
Posts: 1

PostPosted: Sun Feb 13, 2005 3:24 pm    Post subject: IBM.Data.DB2.iSeries database access problem Reply with 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
Back to top
Karl Hanson
*nix forums beginner


Joined: 19 Jul 2005
Posts: 29

PostPosted: Sun Feb 13, 2005 8:33 pm    Post subject: Re: IBM.Data.DB2.iSeries database access problem Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 3:24 am | All times are GMT
navigation Forum index » Databases » IBM DB2
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts [554] Relay access denied annami Postfix 0 Tue Oct 21, 2008 9:12 am
No new posts [554] Relay access denied annami Postfix 0 Tue Oct 21, 2008 9:11 am
No new posts [554] Relay access denied annami Postfix 0 Tue Oct 21, 2008 9:10 am
No new posts Unknown in header problem -SOLVED- Light Speed Postfix 0 Thu Jul 03, 2008 10:40 am
No new posts problem with sending mail nuxia Postfix 0 Mon Apr 21, 2008 3:58 am

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
[ Time: 0.2551s ][ Queries: 16 (0.1649s) ][ GZIP on - Debug on ]