PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Re: ADO.NET Beginner: error connecting to DB2
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Re: ADO.NET Beginner: error connecting to DB2
![]() |
Re: ADO.NET Beginner: error connecting to DB2 |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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) |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

