PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Re: ADO.NET Beginner: error connecting to DB2

Reply

Re: ADO.NET Beginner: error connecting to DB2

 
Thread Tools Rate Thread
Old 04-01-2007, 02:00 PM   #1
Paul Clement
Guest
 
Posts: n/a
Default Re: ADO.NET Beginner: error connecting to DB2


On Thu, 4 Jan 2007 01:23:01 -0800, Philip <Philip@discussions.microsoft.com> wrote:

¤ Hi all,
¤
¤ I am trying to create a connection to DB2 in ADO.NET but I get the following
¤ error:
¤
¤ >>
¤ format of the initialization string does not conform to specification
¤ starting at index 136
¤ <<
¤
¤ It's really strange, I have a quite straightforward connectionstring (from
¤ www.connectionstrings.com)
¤
¤ >>
¤ Provider=DB2OLEDB;Network Transport Library=TCPIP;Network
¤ Address=myIP;Initial Catalog=myDB;User ID=myUser;Password=myPass;
¤ <<
¤
¤ here is my code:
¤
¤ >>
¤ Dim myConnectionString As String
¤ Dim objPM As New Password.Matrix
¤ Dim sPass As String="myPass"
¤
¤ ' If the connection string is null, use a default.
¤ If myConnectionString = "" Then ' dbconnect.statestr.com
¤ myConnectionString = "Provider=DB2OLEDB;Network Transport
¤ Library=TCPIP;Network Address=XXX.XXX.XXX.XXX;Initial Catalog=myDB;User ID="
¤ & txtUser.Text & ";Password=" & sPass
¤ ' myConnectionString = myConnectionString & ";"
¤ End If
¤
¤ Dim myConnection As New OleDbConnection
¤ myConnection.ConnectionString = myConnectionString
¤ <<
¤
¤ thanks for any advice or help

What about the Package Collection and Default Schema arguments? Did you try specifying those values?


Paul
~~~~
Microsoft MVP (Visual Basic)
  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