DB2 IBM OleDB Provider

P

Parking Meters

Today I managed to get the OleDB provider to let me put datasets from an
as400 using sql.

Great, the provider string I used is:

Provider=IBMDA400.DataSource.1;User ID=XXXXX;Password=XXXX;Data
Source=nnn.nnn.nnn.nnn;"/>


Question:

What is /IBMDA400.DataSource.1/ ?

Is that an ODBC driver?

Is it built into .net 1.1 ? Or do I have to install something else?

Is it part of the IBM CAE ( Client Access Express ) Utilities?

Does CAE have to be installed on the client to be able to use
IBMDA400.DataSource.1 ?
 
C

Carlos J. Quintero [.NET MVP]

What is /IBMDA400.DataSource.1/ ?

Introduction: .NET uses .NET Data Providers.

- You have "native" .NET Data Providers for Oracle, SQL Server (provided by
MS) and maybe for IBM (provided by IBM, if any).

- There is a special .NET Data Provider: The Microsoft .NET Data Provider
for OLEDB, which on the contrary to "native" .NET Data Providers, needs an
old OLEDB Provider to work, and should be used when no native .NET Data
Providers is available for a database.

So:

"Provider=IBMDA400.DataSource.1" specifies the OLEDB Provider that the
Microsoft .NET Data Provider for OLEDB must use. In this case, it specifies
that you want to use the OLEDB Provider for IBM. For example,
Provider=MSDAORA would specify the Microsoft OLEDB Provider for Oracle.
Technically it is the ProgID of the COM class exposed by the OLEDB provider.
The .1 specifies the version-depending ProgID.
"Provider=IBMDA400.DataSource" would be the version-independent ProgID.
Is that an ODBC driver?
No.

Is it built into .net 1.1 ? Or do I have to install something else?

The Microsoft .NET Data Provider for OLEDB is supplied by the .NET
Framework. This provider is a .NET-OLEDB bridge which needs an OLEDB
Provider. Some OLEDB Providers for Oracle and SQL Server are supplied by
Microsoft in Microsoft Data Access Components (MDAC), but for IBM you have
to get it presumably from IBM Corp.
Is it part of the IBM CAE ( Client Access Express ) Utilities?

It could be, check with IBM docs.
Does CAE have to be installed on the client to be able to use
IBMDA400.DataSource.1 ?

It's very likely, since .NET Data Providers, OLEDB Providers or ODBC drivers
need the native client DLLs to connect to the database.

Notice that you are using the Microsoft .NET Data Provider for OLEDB with
an OLEDB Provider for IBM. Another approach is to avoid OLEDB and use a
"native" .NET Data Provider for IBM, if IBM offers it. Since you avoid the
bridge component, the performance can be better.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
 
K

Keith

Carlos said:
Notice that you are using the Microsoft .NET Data Provider for OLEDB with
an OLEDB Provider for IBM. Another approach is to avoid OLEDB and use a
"native" .NET Data Provider for IBM, if IBM offers it. Since you avoid the
bridge component, the performance can be better.

There is a provider up on IBM's site, but it's still in beta. I will
try it though.

I have tried ODBC and OleDb.

The time to do a connection in OleDb is /significantly/ longer than when
using ODBC -- but with OleDb I don't have to do any configuration in the
CAE to create the ODBC source.

I'd really like to get away from the CAE since there are versioning
problems with other apps, and I'd like to stay as pure .net as possible.

Thanks for the info on OleDb.
 
F

Frans Bouma [C# MVP]

Keith said:
There is a provider up on IBM's site, but it's still in beta. I will
try it though.

search for: Redistributable DB2 Run-Time Client Lite

on IBM's site. That's the .NET provider and it's not beta anymore.

Frans.

--
 
C

Carlos J. Quintero [.NET MVP]

Keith said:
The time to do a connection in OleDb is /significantly/ longer than when
using ODBC -- but with OleDb I don't have to do any configuration in the
CAE to create the ODBC source.

You can use ODBC DSN-less connections, no need to create ODBC data sources
in the Control Panel, etc. You use "Driver={...};...". Search the concept on
Google or visit
http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
 
C

C.E.O. Gargantua

I downloaded and installed the DB2 Run Time Client Lite Installer, US
English.

After running this install, two entries in the start menu appeared:
Command Line Window and Command Line Processor.

I did not see any documentation.

What are the DB2 Client Merge Modules ?

Do I need to install those as well?

Just by installing the Run Time Client Lite Installer, can I now use
OleDb for .NET using the IBM?

Is the provider still "IBMDA400.DataSource.1"
 
F

Frans Bouma [C# MVP]

C.E.O. Gargantua said:
I downloaded and installed the DB2 Run Time Client Lite Installer, US
English.

After running this install, two entries in the start menu appeared:
Command Line Window and Command Line Processor.

I did not see any documentation.

Also not in vs.net? The .NET provider has an integrated help addition
for vs.net and vs.net designers.
What are the DB2 Client Merge Modules ?

those are for when you create an application using teh DB2 provider and
you want to include the provider in your installer. I.o.w.: you don't
need them to access a db2 system
Do I need to install those as well?

Just by installing the Run Time Client Lite Installer, can I now use
OleDb for .NET using the IBM?

You can use the IBM.Data.DB2.dll assembly, which is the native .NET
provider, so you don't need OleDb anymore. (located in X:\Program
Files\IBM\SQLLIB\BIN\netf11 )
Is the provider still "IBMDA400.DataSource.1"

however! I see you use the AS/400 OleDb driver here (if I'm not
mistaken) and the .NET provider for DB2 doesn't support AS/400
(according to the docs, haven't tried it myself, I don't have an as/400
box )

Frans.
Keith said:
Carlos J. Quintero [.NET MVP] wrote:

Notice that you are using the Microsoft .NET Data Provider for
OLEDB with an OLEDB Provider for IBM. Another approach is to avoid
OLEDB and use a "native" .NET Data Provider for IBM, if IBM offers
it. Since you avoid the bridge component, the performance can be
better.


There is a provider up on IBM's site, but it's still in beta. I will
try it though.



search for: Redistributable DB2 Run-Time Client Lite

on IBM's site. That's the .NET provider and it's not beta anymore.

Frans.


--
 
C

C.E.O. Gargantua

Frans said:
Also not in vs.net? The .NET provider has an integrated help
addition for vs.net and vs.net designers.

Mmm...I searched for IBM and DB2 in Visual Studio and and don't see
anything specific to IBM.Data.DB2

Can you tell me what the location is?
You can use the IBM.Data.DB2.dll assembly, which is the native .NET
provider, so you don't need OleDb anymore. (located in X:\Program
Files\IBM\SQLLIB\BIN\netf11 )

Ok, I found this, and added as a reference.

But I'm still left with the detail of what I should put in for, say
..ConnectionString

DB2Connection db2 = new DB2Connection();
db2.ConnectionString= ... ?
however! I see you use the AS/400 OleDb driver here (if I'm not
mistaken) and the .NET provider for DB2 doesn't support AS/400
(according to the docs, haven't tried it myself, I don't have an as/400
box )

Well, it's an iSeries. Isn't DB2 the same across IBM's hardware product
lines?
 
C

C.E.O. Gargantua

According to :

http://publib.boulder.ibm.com/infoc...tm/frlrfIBMDataDB2DB2ConnectionClassTopic.htm

The DB2 .NET Data Provider allows your .NET applications to access the
following database management systems:

* DB2 Universal Database Version 8 for Windows, UNIX, and
Linux-based computers
* DB2 Universal Database Version 6 (or later) for OS/390 and z/OS,
through DB2 Connect

* DB2 Universal Database Version 5, Release 1 (or later) for AS/400
and iSeries, through DB2 Connect


* DB2 Universal Database Version 7.3 (or later) for VSE & VM,
through DB2 Connect
 
F

Frans Bouma [C# MVP]

C.E.O. Gargantua said:
According to :

http://publib.boulder.ibm.com/infoc...tm/frlrfIBMDataDB2DB2ConnectionClassTopic.htm


The DB2 .NET Data Provider allows your .NET applications to access the
following database management systems:

* DB2 Universal Database Version 8 for Windows, UNIX, and
Linux-based computers
* DB2 Universal Database Version 6 (or later) for OS/390 and z/OS,
through DB2 Connect

* DB2 Universal Database Version 5, Release 1 (or later) for AS/400
and iSeries, through DB2 Connect

Nice :) However if I check the docs coming with the provider:
Supported DB2 servers and system requirements

Supported DB2 servers Client system requirements
DB2 Universal Database for Linux, UNIX, and Windows, Version 8.1
Microsoft Visual Studio .NET 2002
DB2 Universal Database for Windows, Version 8.1

DB2 Universal Database for z/OS or OS/390, Version 7 and 8 Microsoft
Visual Studio .NET 2002
DB2 Universal Database for Windows, Version 8.1

No AS/400. But perhaps it is updated since I installed it, which is a
good thing :D. I wonder what 'through DB Connect' means though: does the
..NET provider automatically pick the right client or do you have to
state something in the connection string... I'll check hte link you
provided as the docs I have (which came with the DB2 personal edition v8
(which installs the .NET provider as well) don't mention this.

You don't have any integrated help in vs.net ?

FB
 
R

Robert Bruckner [MSFT]

* DB2 Universal Database Version 5, Release 1 (or later) for AS/400
I wonder what 'through DB2 Connect' means though

DB2 Connect is a server-side product from IBM (which needs to be licensed
independently). The functionality is similar in some areas to Microsoft's
Host Integration Server product.
 
F

Frans Bouma [C# MVP]

Robert said:
DB2 Connect is a server-side product from IBM (which needs to be licensed
independently). The functionality is similar in some areas to Microsoft's
Host Integration Server product.

Ah thanks, so that's totally transparent then for the client. :)

Frans.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top