IBM DB2 Connection String Problem

D

don

I am creating a VB.net Web application and trying to connect to an IMB DB2
Database and I get the following error:
Keyword Provider not Supported. Here is my code:
Dim DB2connectstring As String =
"provider=IBMDADB2;DSN=GASTRN;UID=castigd;PWD=abcd123;database=GASTRN;"

I did the following imports:

Imports System.IO

Imports System.Data

Imports System.Data.SqlClient

Imports System.Data.OleDb

Imports Microsoft.ApplicationBlocks.Data

Imports System.Diagnostics

I have also added a reference to Microsoft.ApplicationBlocks.Data

I am using Microsoft Development Environment 2003 Version 7.1.3088
Microsoft .NET Framework 1.1 Version 1.1.4322 SP1
Can anyone help me with this problem?
 
J

joelcochran

Using the .NET provider is different that using OLE DB or ODBC.
"Provider" is not a valid ConnectionString property. Using the
iDB2Connection class IS your provider. If you have this installed, you
should be able to get to the docs by going to Start->Programs->IBM
iSeries Access for Windows->Programmer's Toolkit->Programmer's Toolkit.
Once open, expand "Programming Technologies" and select ".NET
Framework" this will give you a link to the Documentation.

For the short term, try using just something like this:

Dim DB2connectstring As String =
"DataSource=192.168.1.1;UserID=castigd;Password=abcd123";

HTH,

Joel
 

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