473,589 Members | 2,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IBM.Data.DB2.iS eries 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.iS eries 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.iS eries.iDB2Conne ctionFailedExce ption
"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.iS eries

Dim cn As New iDB2Connection

Try
TestConnection. ConnectionStrin g = _
"DataSource=AS4 00;UserID=xxxx; Password=xxxx;D atabase=AMFLIB"

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

Thanks to all
Nov 12 '05 #1
1 14910
Yanik Reid wrote:
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.iS eries 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.iS eries.iDB2Conne ctionFailedExce ption
"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.iS eries

Dim cn As New iDB2Connection

Try
TestConnection. ConnectionStrin g = _
"DataSource=AS4 00;UserID=xxxx; Password=xxxx;D atabase=AMFLIB"

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

Thanks to all


You may want to review the online ODBC connection string info here:
http://publib.boulder.ibm.com/infoce...ik/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
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3775
by: Naeem | last post by:
Using the ISeries Access Driver v9.00.04.00 when selecting a column which contains null i get erroneous data. If I keep refreshing the query the results returned with keep changing for the null values. Using tools like winsql or using an Access database and loading it from the DSN there is no problem. i.e all the null values are displayed correctly.
0
3982
by: Dinu | last post by:
Hi All I am trying to insert data within a transaction, into a Db2 database from asp.net. I have created a System DSN using ISeries Access Driver(32 bit) for Windows. I am then connecting to it using Microsoft .Net data provider from asp.net. I am able to insert data by using connection and comand object without
4
7687
by: erkki | last post by:
Hi, I have to move iSeries library to new DB2 database. Is there any easier way to do this moving operation than exporting all tables in iSeries into text files and then import them into DB2 Express? I am looking for same kind of function like db2move between two DB2 databases.
17
7151
by: Sulu's Beard | last post by:
Hey gang, I'm evaluating the CA ERWin product for an upcoming data warehousing project. I'm most excited about the reverse engineering aspect of this system. I've sucessfully tested it on a SQL Server 2000 system, however, when I run it against our iSeries DB2 system (on which our ERP exists), I encounter errors that essentially say that files are missing from our SYSCAT library. I'm not an iSeries expert, but I can say that the
0
1829
by: Twan Kennis | last post by:
Hello! I do have the following problem: I've developed a Windows application which communicates with a DB2-database on the iSeries platform using an ODBC-connection string. This ODBC-connection-string refers to a system-connection configured within the iSeries Navigator based on the Windows username and password of the logged-on user.
3
4057
by: Laurence | last post by:
Hi there, Does somebody know the efficent way to connect DB2/400? Through iSeries Access ODBC/OLEDB driver or DB2 Connect? Which will more fast and efficent? In addition, does DB2 Connect use APPC over TCP/IP protocol? Or SNA protocol?
2
5355
by: scase | last post by:
I need some trying to figure out what is happening on our AS/400. I am not an AS/400 programmer, but I am using ASP.NET (VB) and the IBM.Data.DB2.iSeries control for .NET to access our DB2 databases. The problem we seem to be having is after I am all done with my queries and I close out of everything there are still jobs (QZDAOSINIT?) sitting idle for my profile. My web application can hit our AS/400 hundreds of times at once...
1
6019
by: Chevylover54 | last post by:
We have been using ODBC connections that are in the registry of the computer. However these connections aren't in by default so when a new user uses the Access program or when a current user goes to a different computer, we have to send them the batch program to put the ODBC hooks on that machine. We want to get around that by using Pass-Through queries and the ODBC connection string. What we have got to work is this: ...
3
2447
by: Ion Freeman | last post by:
Hi! My database work has been largely with SQL Server, PostgreSQL and Oracle, so when I have a DB2 question, I don't really know where to turn. I could find the documentation for the current version of DB2 on IBM's website, but I don't know if what's true for the current version is true for the version my client has. Can someone point me to older docs? The question is simply this: 1. There are a number of tables on a DB2 database
0
8233
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8360
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5731
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5399
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3849
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3889
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2374
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1461
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.