PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET IBM DB2 Connection String Problem

Reply

IBM DB2 Connection String Problem

 
Thread Tools Rate Thread
Old 12-05-2005, 08:28 PM   #1
don
Guest
 
Posts: n/a
Default IBM DB2 Connection String Problem


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?


  Reply With Quote
Old 12-05-2005, 08:44 PM   #2
joelcochran@gmail.com
Guest
 
Posts: n/a
Default Re: IBM DB2 Connection String Problem

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

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off